[PATCH 3/3] Rename git-diff-tree-helper to git-diff-helper (part 2).
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>maint
parent
99665af5c0
commit
902b92e00e
|
@ -1,15 +1,15 @@
|
||||||
git-diff-tree-helper(1)
|
git-diff-helper(1)
|
||||||
=======================
|
=======================
|
||||||
v0.1, May 2005
|
v0.1, May 2005
|
||||||
|
|
||||||
NAME
|
NAME
|
||||||
----
|
----
|
||||||
git-diff-tree-helper - Generates patch format output for git-diff-*
|
git-diff-helper - Generates patch format output for git-diff-*
|
||||||
|
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git-diff-tree-helper' [-z] [-R]
|
'git-diff-helper' [-z] [-R]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
@ -26,8 +26,8 @@ OPTIONS
|
||||||
"git-diff-cache" which always compares tree with cache or working
|
"git-diff-cache" which always compares tree with cache or working
|
||||||
file. E.g.
|
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>.
|
would show a diff to bring the working file back to what is in the <tree>.
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
|
|
|
@ -45,8 +45,8 @@ static int parse_oneside_change(const char *cp, struct diff_spec *one,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parse_diff_tree_output(const char *buf,
|
static int parse_diff_raw_output(const char *buf,
|
||||||
const char **spec, int cnt, int reverse)
|
const char **spec, int cnt, int reverse)
|
||||||
{
|
{
|
||||||
struct diff_spec old, new;
|
struct diff_spec old, new;
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
|
@ -109,8 +109,8 @@ static int parse_diff_tree_output(const char *buf,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *diff_tree_helper_usage =
|
static const char *diff_helper_usage =
|
||||||
"diff-tree-helper [-R] [-z] paths...";
|
"git-diff-helper [-R] [-z] paths...";
|
||||||
|
|
||||||
int main(int ac, const char **av) {
|
int main(int ac, const char **av) {
|
||||||
struct strbuf sb;
|
struct strbuf sb;
|
||||||
|
@ -125,7 +125,7 @@ int main(int ac, const char **av) {
|
||||||
else if (av[1][1] == 'z')
|
else if (av[1][1] == 'z')
|
||||||
line_termination = 0;
|
line_termination = 0;
|
||||||
else
|
else
|
||||||
usage(diff_tree_helper_usage);
|
usage(diff_helper_usage);
|
||||||
ac--; av++;
|
ac--; av++;
|
||||||
}
|
}
|
||||||
/* the remaining parameters are paths patterns */
|
/* the remaining parameters are paths patterns */
|
||||||
|
@ -135,7 +135,7 @@ int main(int ac, const char **av) {
|
||||||
read_line(&sb, stdin, line_termination);
|
read_line(&sb, stdin, line_termination);
|
||||||
if (sb.eof)
|
if (sb.eof)
|
||||||
break;
|
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)
|
if (status)
|
||||||
fprintf(stderr, "cannot parse %s\n", sb.buf);
|
fprintf(stderr, "cannot parse %s\n", sb.buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue