Skip to content

Commit

Permalink
Retire diff-helper.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Sep 22, 2005
1 parent 9dcc829 commit 5cfcd07
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 415 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ git-cvsimport
git-daemon
git-diff
git-diff-files
git-diff-helper
git-diff-index
git-diff-stages
git-diff-tree
Expand Down
3 changes: 1 addition & 2 deletions Documentation/diff-format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
with a '-p' option, they do not produce the output described above;
instead they produce a patch file.

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

1. When the environment variable 'GIT_EXTERNAL_DIFF' is not set,
these commands internally invoke "diff" like this:
Expand Down
53 changes: 0 additions & 53 deletions Documentation/git-diff-helper.txt

This file was deleted.

3 changes: 0 additions & 3 deletions Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,6 @@ gitlink:git-count-objects[1]::
gitlink:git-daemon[1]::
A really simple server for GIT repositories.

gitlink:git-diff-helper[1]::
Generates patch format output for git-diff-*

gitlink:git-get-tar-commit-id[1]::
Extract commit ID from an archive created using git-tar-tree.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ PROGRAMS = \
git-apply git-cat-file \
git-checkout-index git-clone-pack git-commit-tree \
git-convert-objects git-diff-files \
git-diff-helper git-diff-index git-diff-stages \
git-diff-index git-diff-stages \
git-diff-tree git-fetch-pack git-fsck-objects \
git-hash-object git-init-db \
git-local-fetch git-ls-files git-ls-tree git-merge-base \
Expand Down
154 changes: 0 additions & 154 deletions diff-helper.c

This file was deleted.

23 changes: 0 additions & 23 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,29 +1152,6 @@ void diff_addremove(int addremove, unsigned mode,
diff_queue(&diff_queued_diff, one, two);
}

void diff_helper_input(unsigned old_mode,
unsigned new_mode,
const unsigned char *old_sha1,
const unsigned char *new_sha1,
const char *old_path,
int status,
int score,
const char *new_path)
{
struct diff_filespec *one, *two;
struct diff_filepair *dp;

one = alloc_filespec(old_path);
two = alloc_filespec(new_path);
if (old_mode)
fill_filespec(one, old_sha1, old_mode);
if (new_mode)
fill_filespec(two, new_sha1, new_mode);
dp = diff_queue(&diff_queued_diff, one, two);
dp->score = score * MAX_SCORE / 100;
dp->status = status;
}

void diff_change(unsigned old_mode, unsigned new_mode,
const unsigned char *old_sha1,
const unsigned char *new_sha1,
Expand Down
9 changes: 0 additions & 9 deletions diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ extern void diff_change(unsigned mode1, unsigned mode2,
const unsigned char *sha2,
const char *base, const char *path);

extern void diff_helper_input(unsigned mode1,
unsigned mode2,
const unsigned char *sha1,
const unsigned char *sha2,
const char *path1,
int status,
int score,
const char *path2);

extern void diff_unmerge(const char *path);

extern int diff_scoreopt_parse(const char *opt);
Expand Down
9 changes: 0 additions & 9 deletions t/t4000-diff-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,4 @@ test_expect_success \
'validate git-diff-files -p output.' \
'cmp -s current expected'

test_expect_success \
'build same diff using git-diff-helper.' \
'git-diff-files -z | git-diff-helper -z >current'


test_expect_success \
'validate git-diff-helper output.' \
'cmp -s current expected'

test_done
Loading

0 comments on commit 5cfcd07

Please sign in to comment.