@@ -36,11 +36,25 @@ files:
36
36
37
37
- 'git-diff-tree' compares contents of two "tree" objects;
38
38
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.
44
58
45
59
------------------------------------------------
46
60
in-place edit :100644 100644 bcd1234... 0123456... M file0
@@ -52,48 +66,23 @@ unmerged :000000 000000 0000000... 0000000... U file6
52
66
The diffcore mechanism is fed a list of such comparison results
53
67
(each of which is called "filepair", although at this point each
54
68
of 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:
56
70
57
- - diffcore-pathspec
58
71
- diffcore-break
59
72
- diffcore-rename
60
73
- diffcore-merge-broken
61
74
- diffcore-pickaxe
62
75
- diffcore-order
63
76
64
77
These 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
67
80
next transformation. The final result is then passed to the
68
81
output routine and generates either diff-raw format (see Output
69
82
format sections of the manual for 'git-diff-{asterisk}' commands) or
70
83
diff-patch format.
71
84
72
85
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
-
97
86
diffcore-break: For Splitting Up "Complete Rewrites"
98
87
----------------------------------------------------
99
88
0 commit comments