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>
This commit is contained in:
committed by
Junio C Hamano
parent
548d3464dc
commit
99caeed05d
@ -882,6 +882,9 @@ int main(int argc, char **argv)
|
||||
|
||||
git_extract_argv0_path(argv[0]);
|
||||
|
||||
if (argc == 2 && !strcmp(argv[1], "-h"))
|
||||
usage(index_pack_usage);
|
||||
|
||||
/*
|
||||
* We wish to read the repository's config file if any, and
|
||||
* for that it is necessary to call setup_git_directory_gently().
|
||||
|
||||
Reference in New Issue
Block a user