Skip to content

Commit 5cfcd07

Browse files
author
Junio C Hamano
committed
Retire diff-helper.
The textual diff generation with built-in '-p' in diff-* brothers has proven to be useful enough that git-diff-helper outlived its usefulness. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 9dcc829 commit 5cfcd07

File tree

11 files changed

+2
-415
lines changed

11 files changed

+2
-415
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ git-cvsimport
2020
git-daemon
2121
git-diff
2222
git-diff-files
23-
git-diff-helper
2423
git-diff-index
2524
git-diff-stages
2625
git-diff-tree

Documentation/diff-format.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
6262
with a '-p' option, they do not produce the output described above;
6363
instead they produce a patch file.
6464

65-
The patch generation can be customized at two levels. This
66-
customization also applies to "git-diff-helper".
65+
The patch generation can be customized at two levels.
6766

6867
1. When the environment variable 'GIT_EXTERNAL_DIFF' is not set,
6968
these commands internally invoke "diff" like this:

Documentation/git-diff-helper.txt

Lines changed: 0 additions & 53 deletions
This file was deleted.

Documentation/git.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,6 @@ gitlink:git-count-objects[1]::
363363
gitlink:git-daemon[1]::
364364
A really simple server for GIT repositories.
365365

366-
gitlink:git-diff-helper[1]::
367-
Generates patch format output for git-diff-*
368-
369366
gitlink:git-get-tar-commit-id[1]::
370367
Extract commit ID from an archive created using git-tar-tree.
371368

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ PROGRAMS = \
102102
git-apply git-cat-file \
103103
git-checkout-index git-clone-pack git-commit-tree \
104104
git-convert-objects git-diff-files \
105-
git-diff-helper git-diff-index git-diff-stages \
105+
git-diff-index git-diff-stages \
106106
git-diff-tree git-fetch-pack git-fsck-objects \
107107
git-hash-object git-init-db \
108108
git-local-fetch git-ls-files git-ls-tree git-merge-base \

diff-helper.c

Lines changed: 0 additions & 154 deletions
This file was deleted.

diff.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,29 +1152,6 @@ void diff_addremove(int addremove, unsigned mode,
11521152
diff_queue(&diff_queued_diff, one, two);
11531153
}
11541154

1155-
void diff_helper_input(unsigned old_mode,
1156-
unsigned new_mode,
1157-
const unsigned char *old_sha1,
1158-
const unsigned char *new_sha1,
1159-
const char *old_path,
1160-
int status,
1161-
int score,
1162-
const char *new_path)
1163-
{
1164-
struct diff_filespec *one, *two;
1165-
struct diff_filepair *dp;
1166-
1167-
one = alloc_filespec(old_path);
1168-
two = alloc_filespec(new_path);
1169-
if (old_mode)
1170-
fill_filespec(one, old_sha1, old_mode);
1171-
if (new_mode)
1172-
fill_filespec(two, new_sha1, new_mode);
1173-
dp = diff_queue(&diff_queued_diff, one, two);
1174-
dp->score = score * MAX_SCORE / 100;
1175-
dp->status = status;
1176-
}
1177-
11781155
void diff_change(unsigned old_mode, unsigned new_mode,
11791156
const unsigned char *old_sha1,
11801157
const unsigned char *new_sha1,

diff.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ extern void diff_change(unsigned mode1, unsigned mode2,
1919
const unsigned char *sha2,
2020
const char *base, const char *path);
2121

22-
extern void diff_helper_input(unsigned mode1,
23-
unsigned mode2,
24-
const unsigned char *sha1,
25-
const unsigned char *sha2,
26-
const char *path1,
27-
int status,
28-
int score,
29-
const char *path2);
30-
3122
extern void diff_unmerge(const char *path);
3223

3324
extern int diff_scoreopt_parse(const char *opt);

t/t4000-diff-format.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,4 @@ test_expect_success \
5050
'validate git-diff-files -p output.' \
5151
'cmp -s current expected'
5252

53-
test_expect_success \
54-
'build same diff using git-diff-helper.' \
55-
'git-diff-files -z | git-diff-helper -z >current'
56-
57-
58-
test_expect_success \
59-
'validate git-diff-helper output.' \
60-
'cmp -s current expected'
61-
6253
test_done

0 commit comments

Comments
 (0)