Thread (34 messages) flat view 34 messages, 3 authors, 2016-06-15
STALE3749d

[PATCH 09/24] Show usage string for 'git fast-import -h'

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:47:41
Subsystem: the rest · Maintainer: Linus Torvalds

Let "git fast-import -h" (with no other arguments) print usage
before exiting, even when run outside any repository.

Cc: Shawn O. Pearce <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
 fast-import.c |    3 +++
 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)
-- 
1.6.5.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help