interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / git-diff-pairs.adoc

60 lines · 2006 bytes Raw Blame History
1git-diff-pairs(1)
2=================
3
4NAME
5----
6git-diff-pairs - Compare the content and mode of provided blob pairs
7
8SYNOPSIS
9--------
10[synopsis]
11git diff-pairs -z [<diff-options>]
12
13DESCRIPTION
14-----------
15Show changes for file pairs provided on stdin. Input for this command must be
16in the NUL-terminated raw output format as generated by commands such as `git
17diff-tree -z -r --raw`. By default, the outputted diffs are computed and shown
18in the patch format when stdin closes.
19
20A single NUL byte may be written to stdin between raw input lines to compute
21file pair diffs up to that point instead of waiting for stdin to close. A NUL
22byte is also written to the output to delimit between these batches of diffs.
23
24Usage of this command enables the traditional diff pipeline to be broken up
25into separate stages where `diff-pairs` acts as the output phase. Other
26commands, such as `diff-tree`, may serve as a frontend to compute the raw
27diff format used as input.
28
29Instead of computing diffs via `git diff-tree -p -M` in one step, `diff-tree`
30can compute the file pairs and rename information without the blob diffs. This
31output can be fed to `diff-pairs` to generate the underlying blob diffs as done
32in the following example:
33
34-----------------------------
35git diff-tree -z -r -M $a $b |
36git diff-pairs -z
37-----------------------------
38
39Computing the tree diff upfront with rename information allows patch output
40from `diff-pairs` to be progressively computed over the course of potentially
41multiple invocations.
42
43Pathspecs are not currently supported by `diff-pairs`. Pathspec limiting should
44be performed by the upstream command generating the raw diffs used as input.
45
46Tree objects are not currently supported as input and are rejected.
47
48Abbreviated object IDs in the `diff-pairs` input are not supported. Outputted
49object IDs can be abbreviated using the `--abbrev` option.
50
51OPTIONS
52-------
53
54include::diff-options.adoc[]
55
56include::diff-generate-patch.adoc[]
57
58GIT
59---
60Part of the linkgit:git[1] suite