summaryrefslogtreecommitdiff
path: root/builtin/update-index.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-13 05:49:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-12-13 05:49:50 (GMT)
commit6758af89e4bf3f767e189da3e09c3c939162872d (patch)
treed0f25a4cd8c831949748fe9334aaad595e225cd1 /builtin/update-index.c
parent4443091d961e91041e64c1675940f0585eeba456 (diff)
parent9c7c27eeab73b4c90cf36c6aa06ba6b8b9777629 (diff)
downloadgit-6758af89e4bf3f767e189da3e09c3c939162872d.zip
git-6758af89e4bf3f767e189da3e09c3c939162872d.tar.gz
git-6758af89e4bf3f767e189da3e09c3c939162872d.tar.bz2
Merge branch 'jn/git-cmd-h-bypass-setup'
* jn/git-cmd-h-bypass-setup: update-index -h: show usage even with corrupt index merge -h: show usage even with corrupt index ls-files -h: show usage even with corrupt index gc -h: show usage even with broken configuration commit/status -h: show usage even with broken configuration checkout-index -h: show usage even in an invalid repository branch -h: show usage even in an invalid repository Conflicts: builtin/merge.c
Diffstat (limited to 'builtin/update-index.c')
-rw-r--r--builtin/update-index.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 62d9f3f..200c7ef 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -589,6 +589,9 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
int lock_error = 0;
struct lock_file *lock_file;
+ if (argc == 2 && !strcmp(argv[1], "-h"))
+ usage(update_index_usage);
+
git_config(git_default_config, NULL);
/* We can't free this memory, it becomes part of a linked list parsed atexit() */