DORMANTno replies

[PATCH] format-patch: print format-patch usage if there are no arguments

From: Alexander Kuleshov <hidden>
Date: 2016-06-15 23:03:28
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Alexander Kuleshov <redacted>
---
 builtin/log.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/builtin/log.c b/builtin/log.c
index ad3cfd8..4431b50 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1246,6 +1246,10 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 		OPT_END()
 	};
 
+	/* We need at least one revision */
+	if (argc == 1)
+		usage_with_options(builtin_format_patch_usage, builtin_format_patch_options);
+
 	extra_hdr.strdup_strings = 1;
 	extra_to.strdup_strings = 1;
 	extra_cc.strdup_strings = 1;
-- 
2.3.0.rc0.239.g0ae1f56.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help