diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2009-11-09 09:05:01 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-10 12:00:21 -0800 |
commit | 99caeed05d3e89176d352104a2b70a77aa7e5d81 (patch) | |
tree | f65515f8b4302877d661176266cd6bf9a75e5a53 /builtin-read-tree.c | |
parent | Show usage string for 'git http-push -h' (diff) | |
download | tgif-99caeed05d3e89176d352104a2b70a77aa7e5d81.tar.xz |
Let 'git <command> -h' show usage without a git dir
There is no need for "git <command> -h" to depend on being inside
a repository.
Reported by Gerfried Fuchs through http://bugs.debian.org/462557
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-read-tree.c')
-rw-r--r-- | builtin-read-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c index 14c836b169..2a3a32cbfe 100644 --- a/builtin-read-tree.c +++ b/builtin-read-tree.c @@ -108,11 +108,11 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix) git_config(git_default_config, NULL); - newfd = hold_locked_index(&lock_file, 1); - argc = parse_options(argc, argv, unused_prefix, read_tree_options, read_tree_usage, 0); + newfd = hold_locked_index(&lock_file, 1); + prefix_set = opts.prefix ? 1 : 0; if (1 < opts.merge + opts.reset + prefix_set) die("Which one? -m, --reset, or --prefix?"); |