From c5bac17ad21c8e79fcca21c366832e75be095322 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 20 Apr 2005 19:49:16 -0700 Subject: [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 Signed-off-by: Linus Torvalds --- diff-tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'diff-tree.c') diff --git a/diff-tree.c b/diff-tree.c index 222591936f..0f370927dd 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] "; + 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] "); + usage(diff_tree_usage); } if (argc != 3 || get_sha1_hex(argv[1], old) || get_sha1_hex(argv[2], new)) - usage("diff-tree "); + usage(diff_tree_usage); return diff_tree_sha1(old, new, ""); } -- cgit v1.3-5-g9baa