From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Alexander Kuleshov <kuleshovmail@gmail.com>
Subject: [PATCH] format-patch: print format-patch usage if there are no arguments
Date: Tue, 13 Jan 2015 23:54:22 +0600 [thread overview]
Message-ID: <1421171662-12164-1-git-send-email-kuleshovmail@gmail.com> (raw)
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
next reply other threads:[~2015-01-13 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 17:54 Alexander Kuleshov [this message]
2015-01-13 18:43 ` [PATCH] format-patch: print format-patch usage if there are no arguments 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421171662-12164-1-git-send-email-kuleshovmail@gmail.com \
--to=kuleshovmail@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).