Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
diff- and log- family: handle "git cmd -h" early
[gitweb.git]
/
builtin
/
diff-index.c
diff --git
a/builtin/diff-index.c
b/builtin/diff-index.c
index 1af373d0021f56f539a1d261e908a60d92ff5b4f..02dd35ba456ed4e0d12d4a1fe8fd58f0c4d406a1 100644
(file)
--- a/
builtin/diff-index.c
+++ b/
builtin/diff-index.c
@@
-17,6
+17,9
@@
int cmd_diff_index(int argc, const char **argv, const char *prefix)
int i;
int result;
+ if (argc == 2 && !strcmp(argv[1], "-h"))
+ usage(diff_cache_usage);
+
init_revisions(&rev, prefix);
gitmodules_config();
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */