@matheusbsbs / matheus-bagliano / commits / 71a04a8b52
Fork 0

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>

Jonathan Nieder committed Nov 9, 2009 at 09:04 UTC 71a04a8b52b8a89addd31da5b2272d572fdc7e40
1 file changed +3
fast-import.c
+3
@@ -2405,6 +2405,9 @@ int main(int argc, const char **argv)
2405
2406 git_extract_argv0_path(argv[0]);
2407
2408 + if (argc == 2 && !strcmp(argv[1], "-h"))
2409 + usage(fast_import_usage);
2410 +
2411 setup_git_directory();
2412 git_config(git_pack_config, NULL);
2413 if (!pack_compression_seen && core_compression_seen)