Skip to content

Commit 264e0b9

Browse files
ydirsongitster
authored andcommitted
Bust the ghost of long-defunct diffcore-pathspec.
This concept was retired by 77882f6 (Retire diffcore-pathspec., 2006-04-10), more than 2 years ago. Signed-off-by: Yann Dirson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aa5735b commit 264e0b9

File tree

2 files changed

+22
-34
lines changed

2 files changed

+22
-34
lines changed

Documentation/gitdiffcore.txt

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -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
------------------------------------------------
4660
in-place edit :100644 100644 bcd1234... 0123456... M file0
@@ -52,48 +66,23 @@ unmerged :000000 000000 0000000... 0000000... U file6
5266
The diffcore mechanism is fed a list of such comparison results
5367
(each of which is called "filepair", although at this point each
5468
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:
5670

57-
- diffcore-pathspec
5871
- diffcore-break
5972
- diffcore-rename
6073
- diffcore-merge-broken
6174
- diffcore-pickaxe
6275
- diffcore-order
6376

6477
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
6780
next transformation. The final result is then passed to the
6881
output routine and generates either diff-raw format (see Output
6982
format sections of the manual for 'git-diff-{asterisk}' commands) or
7083
diff-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-
9786
diffcore-break: For Splitting Up "Complete Rewrites"
9887
----------------------------------------------------
9988

diffcore.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ extern struct diff_filepair *diff_queue(struct diff_queue_struct *,
9292
struct diff_filespec *);
9393
extern void diff_q(struct diff_queue_struct *, struct diff_filepair *);
9494

95-
extern void diffcore_pathspec(const char **pathspec);
9695
extern void diffcore_break(int);
9796
extern void diffcore_rename(struct diff_options *);
9897
extern void diffcore_merge_broken(void);

0 commit comments

Comments
 (0)