From: Alexander Kuleshov Date: Tue, 13 Jan 2015 17:54:22 GMT Subject: [PATCH] format-patch: print format-patch usage if there are no arguments Message-ID: <1421171662-12164-1-git-send-email-kuleshovmail@gmail.com> Signed-off-by: Alexander Kuleshov --- 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