summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2009-11-09 15:04:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-11-10 19:06:56 (GMT)
commit71a04a8b52b8a89addd31da5b2272d572fdc7e40 (patch)
treea24e186e8057d9eb871045d63c5ed1971e4fd073 /fast-import.c
parentaeda85a81547b05c36939defb420e5f02bf05e51 (diff)
downloadgit-71a04a8b52b8a89addd31da5b2272d572fdc7e40.zip
git-71a04a8b52b8a89addd31da5b2272d572fdc7e40.tar.gz
git-71a04a8b52b8a89addd31da5b2272d572fdc7e40.tar.bz2
Show usage string for 'git fast-import -h'
Let "git fast-import -h" (with no other arguments) print usage before exiting, even when run outside any repository. Cc: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fast-import.c b/fast-import.c
index 6faaaac..f4f1de6 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2405,6 +2405,9 @@ int main(int argc, const char **argv)
git_extract_argv0_path(argv[0]);
+ if (argc == 2 && !strcmp(argv[1], "-h"))
+ usage(fast_import_usage);
+
setup_git_directory();
git_config(git_pack_config, NULL);
if (!pack_compression_seen && core_compression_seen)