summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 99665af)
raw | patch | inline | side by side (parent: 99665af)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 14 May 2005 01:41:36 +0000 (18:41 -0700) | ||
committer | Petr Baudis <xpasky@machine.sinus.cz> | |
Sun, 15 May 2005 00:06:05 +0000 (02:06 +0200) |
It used to be that diff-tree needed helper support to parse its
raw output to generate diffs, but these days git-diff-* family
produces the same output and the helper is not tied to diff-tree
anymore. Drop "tree" from its name.
This follows the "rename only" commit to adjust the contents of
the files involved.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
raw output to generate diffs, but these days git-diff-* family
produces the same output and the helper is not tied to diff-tree
anymore. Drop "tree" from its name.
This follows the "rename only" commit to adjust the contents of
the files involved.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Documentation/git-diff-helper.txt | patch | blob | history | |
diff-helper.c | patch | blob | history |
index 58f27172a9e23bf43f3bae6eb184e72425715b84..f879ed98925033763263f1f9f38b514aa1d16346 100644 (file)
-git-diff-tree-helper(1)
+git-diff-helper(1)
=======================
v0.1, May 2005
NAME
----
-git-diff-tree-helper - Generates patch format output for git-diff-*
+git-diff-helper - Generates patch format output for git-diff-*
SYNOPSIS
--------
-'git-diff-tree-helper' [-z] [-R]
+'git-diff-helper' [-z] [-R]
DESCRIPTION
-----------
"git-diff-cache" which always compares tree with cache or working
file. E.g.
- git-diff-cache <tree> | git-diff-tree-helper -R file.c
-+
+ git-diff-cache <tree> | git-diff-helper -R file.c
+
would show a diff to bring the working file back to what is in the <tree>.
See Also
diff --git a/diff-helper.c b/diff-helper.c
index 51bb658be4f73c00016b4ecb82f09d30941998a4..cd0bad06bae35b4900bd53df794fc1e9fd4ff9b3 100644 (file)
--- a/diff-helper.c
+++ b/diff-helper.c
return 0;
}
-static int parse_diff_tree_output(const char *buf,
- const char **spec, int cnt, int reverse)
+static int parse_diff_raw_output(const char *buf,
+ const char **spec, int cnt, int reverse)
{
struct diff_spec old, new;
char path[PATH_MAX];
return 0;
}
-static const char *diff_tree_helper_usage =
-"diff-tree-helper [-R] [-z] paths...";
+static const char *diff_helper_usage =
+"git-diff-helper [-R] [-z] paths...";
int main(int ac, const char **av) {
struct strbuf sb;
else if (av[1][1] == 'z')
line_termination = 0;
else
- usage(diff_tree_helper_usage);
+ usage(diff_helper_usage);
ac--; av++;
}
/* the remaining parameters are paths patterns */
read_line(&sb, stdin, line_termination);
if (sb.eof)
break;
- status = parse_diff_tree_output(sb.buf, av+1, ac-1, reverse);
+ status = parse_diff_raw_output(sb.buf, av+1, ac-1, reverse);
if (status)
fprintf(stderr, "cannot parse %s\n", sb.buf);
}