summaryrefslogtreecommitdiff
path: root/t/t3301-notes.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2010-06-28 08:59:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-28 16:15:15 (GMT)
commitbbb1b8a35a06203020f7ab6d1ad58bcb4afe8e93 (patch)
treec7e4500bf95872f4ffa394fef1af3ebac236a72a /t/t3301-notes.sh
parent9eafa1201b2dcc703258ca7cd53de8ac4de74565 (diff)
downloadgit-bbb1b8a35a06203020f7ab6d1ad58bcb4afe8e93.zip
git-bbb1b8a35a06203020f7ab6d1ad58bcb4afe8e93.tar.gz
git-bbb1b8a35a06203020f7ab6d1ad58bcb4afe8e93.tar.bz2
notes: check number of parameters to "git notes copy"
Otherwise we may segfault with too few parameters. Signed-off-by: Jeff King <peff@peff.net> Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3301-notes.sh')
-rwxr-xr-xt/t3301-notes.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 64f32ad..2d67a40 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -1044,4 +1044,10 @@ test_expect_success 'GIT_NOTES_REWRITE_REF overrides config' '
git log -1 > output &&
test_cmp expect output
'
+
+test_expect_success 'git notes copy diagnoses too many or too few parameters' '
+ test_must_fail git notes copy &&
+ test_must_fail git notes copy one two three
+'
+
test_done