summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec96224)
raw | patch | inline | side by side (parent: ec96224)
author | Michele Ballabio <barra_cuda@katamail.com> | |
Sun, 20 Jul 2008 12:34:47 +0000 (14:34 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 20 Jul 2008 20:37:26 +0000 (13:37 -0700) |
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>
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>
builtin-merge.c | patch | blob | history | |
t/t7600-merge.sh | patch | blob | history |
diff --git a/builtin-merge.c b/builtin-merge.c
index 06b9970306396ca8ef2b64d95a411280796f4017..e97c79e60cdb8227ad682a3927ae955005cbe1f3 100644 (file)
--- a/builtin-merge.c
+++ b/builtin-merge.c
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;
}
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 26cf8dc7c15ce397d7c36b2dd39a9d38db9856d7..5eeb6c2b2708d582a6e86cd2e06e2b00b7b7b391 100755 (executable)
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
test_debug 'gitk --all'
-test_expect_failure 'test option parsing' '
+test_expect_success 'test option parsing' '
test_must_fail git merge -$ c1 &&
test_must_fail git merge --no-such c1 &&
test_must_fail git merge -s foobar c1 &&