From bbb1b8a35a06203020f7ab6d1ad58bcb4afe8e93 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 28 Jun 2010 04:59:07 -0400 Subject: notes: check number of parameters to "git notes copy" Otherwise we may segfault with too few parameters. Signed-off-by: Jeff King Tested-by: Bert Wesarg Signed-off-by: Junio C Hamano --- t/t3301-notes.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't/t3301-notes.sh') diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index 64f32ad94d..2d67a40fc1 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 -- cgit v1.2.3