git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] format-patch: print format-patch usage if there are no arguments
@ 2015-01-13 17:54 Alexander Kuleshov
  2015-01-13 18:43 ` Junio C Hamano
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kuleshov @ 2015-01-13 17:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Alexander Kuleshov

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-01-14  1:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 17:54 [PATCH] format-patch: print format-patch usage if there are no arguments Alexander Kuleshov
2015-01-13 18:43 ` Junio C Hamano
2015-01-13 18:52   ` Alexander Kuleshov
2015-01-13 19:17     ` Junio C Hamano
2015-01-13 20:00       ` Stefan Beller
2015-01-13 22:28         ` Junio C Hamano
2015-01-13 22:45           ` Jeff King
2015-01-13 22:48             ` Stefan Beller
2015-01-14  1:28               ` my hacky mutt-specific format-patch workflow Jeff King
2015-01-13 23:41             ` [PATCH] format-patch: print format-patch usage if there are no arguments Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).