@@ -36,11 +36,25 @@ files:
3636
3737 - 'git-diff-tree' compares contents of two "tree" objects;
3838
39- In all of these cases, the commands themselves compare
40- corresponding paths in the two sets of files. The result of
41- comparison is passed from these commands to what is internally
42- called "diffcore", in a format similar to what is output when
43- the -p option is not used. E.g.
39+ In all of these cases, the commands themselves first optionally limit
40+ the two sets of files by any pathspecs given on their command-lines,
41+ and compare corresponding paths in the two resulting sets of files.
42+
43+ The pathspecs are used to limit the world diff operates in. They remove
44+ the filepairs outside the specified sets of pathnames. E.g. If the
45+ input set of filepairs included:
46+
47+ ------------------------------------------------
48+ :100644 100644 bcd1234... 0123456... M junkfile
49+ ------------------------------------------------
50+
51+ but the command invocation was `git diff-files myfile`, then the
52+ junkfile entry would be removed from the list because only "myfile"
53+ is under consideration.
54+
55+ The result of comparison is passed from these commands to what is
56+ internally called "diffcore", in a format similar to what is output
57+ when the -p option is not used. E.g.
4458
4559------------------------------------------------
4660in-place edit :100644 100644 bcd1234... 0123456... M file0
@@ -52,48 +66,23 @@ unmerged :000000 000000 0000000... 0000000... U file6
5266The diffcore mechanism is fed a list of such comparison results
5367(each of which is called "filepair", although at this point each
5468of them talks about a single file), and transforms such a list
55- into another list. There are currently 6 such transformations:
69+ into another list. There are currently 5 such transformations:
5670
57- - diffcore-pathspec
5871- diffcore-break
5972- diffcore-rename
6073- diffcore-merge-broken
6174- diffcore-pickaxe
6275- diffcore-order
6376
6477These are applied in sequence. The set of filepairs 'git-diff-{asterisk}'
65- commands find are used as the input to diffcore-pathspec , and
66- the output from diffcore-pathspec is used as the input to the
78+ commands find are used as the input to diffcore-break , and
79+ the output from diffcore-break is used as the input to the
6780next transformation. The final result is then passed to the
6881output routine and generates either diff-raw format (see Output
6982format sections of the manual for 'git-diff-{asterisk}' commands) or
7083diff-patch format.
7184
7285
73- diffcore-pathspec: For Ignoring Files Outside Our Consideration
74- ---------------------------------------------------------------
75-
76- The first transformation in the chain is diffcore-pathspec, and
77- is controlled by giving the pathname parameters to the
78- 'git-diff-{asterisk}' commands on the command line. The pathspec is used
79- to limit the world diff operates in. It removes the filepairs
80- outside the specified set of pathnames. E.g. If the input set
81- of filepairs included:
82-
83- ------------------------------------------------
84- :100644 100644 bcd1234... 0123456... M junkfile
85- ------------------------------------------------
86-
87- but the command invocation was `git diff-files myfile`, then the
88- junkfile entry would be removed from the list because only "myfile"
89- is under consideration.
90-
91- Implementation note. For performance reasons, 'git-diff-tree'
92- uses the pathname parameters on the command line to cull set of
93- filepairs it feeds the diffcore mechanism itself, and does not
94- use diffcore-pathspec, but the end result is the same.
95-
96-
9786diffcore-break: For Splitting Up "Complete Rewrites"
9887----------------------------------------------------
9988
0 commit comments