diff options
author | Michele Ballabio <barra_cuda@katamail.com> | 2008-07-20 14:34:47 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-20 13:37:26 -0700 |
commit | 74f5b7fba420eb6b807db48d0ee7a000202f8225 (patch) | |
tree | 102b124ac549cac5ecdcac1d0efbacc298d21e7f /builtin-merge.c | |
parent | ec96224e215f1b2f143524afa339564271c11e12 (diff) | |
download | git-74f5b7fba420eb6b807db48d0ee7a000202f8225.tar.gz git-74f5b7fba420eb6b807db48d0ee7a000202f8225.tar.xz |
builtin-merge.c: Fix option parsing
Now "git merge -m" needs a message, and errors out with the usage
text if none is given.
This way, t7600-merge.sh is fixed.
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-merge.c')
-rw-r--r-- | builtin-merge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-merge.c b/builtin-merge.c index 06b997030..e97c79e60 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -66,10 +66,11 @@ static int option_parse_message(const struct option *opt, if (unset) strbuf_setlen(buf, 0); - else { + else if (arg) { strbuf_addf(buf, "%s\n\n", arg); have_message = 1; - } + } else + return error("switch `m' requires a value"); return 0; } |