summaryrefslogtreecommitdiff
path: root/diff-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-04-21 02:49:16 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-21 02:49:16 (GMT)
commitc5bac17ad21c8e79fcca21c366832e75be095322 (patch)
treede6864be255ba016d22ddef52cad71f35b334927 /diff-tree.c
parent80913d4364c0be4d9b97eabcd2c8acb800c647c1 (diff)
downloadgit-c5bac17ad21c8e79fcca21c366832e75be095322.zip
git-c5bac17ad21c8e79fcca21c366832e75be095322.tar.gz
git-c5bac17ad21c8e79fcca21c366832e75be095322.tar.bz2
[PATCH] Usage-string fixes.
Usage string fixes to make maintenance easier (only one instance of a string to update not multiple copies). I've spotted and corrected inconsistent usage text in diff-tree while doing this. Also diff-cache and read-tree usage text have been corrected to match their up-to-date features. Earlier, neither "--cached" form of diff-cache nor "-m single-merge" form of read-tree were described. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff-tree.c')
-rw-r--r--diff-tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/diff-tree.c b/diff-tree.c
index 2225919..0f37092 100644
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -178,6 +178,8 @@ static int diff_tree_sha1(const unsigned char *old, const unsigned char *new, co
return retval;
}
+static char *diff_tree_usage = "diff-tree [-r] [-z] <tree sha1> <tree sha1>";
+
int main(int argc, char **argv)
{
unsigned char old[20], new[20];
@@ -194,10 +196,10 @@ int main(int argc, char **argv)
line_termination = '\0';
continue;
}
- usage("diff-tree [-r] [-z] <tree sha1> <tree sha1>");
+ usage(diff_tree_usage);
}
if (argc != 3 || get_sha1_hex(argv[1], old) || get_sha1_hex(argv[2], new))
- usage("diff-tree <tree sha1> <tree sha1>");
+ usage(diff_tree_usage);
return diff_tree_sha1(old, new, "");
}