Code

revision.c: make --no-notes reset --notes list
[git.git] / t / t3301-notes.sh
index f0e7a581237a775443d720211032a7a3504876cf..8600db7edb5c73beb56a9059fa222ce4170d2a7f 100755 (executable)
@@ -269,6 +269,22 @@ test_expect_success 'git log --notes --notes=X shows both' '
        grep alternate output
 '
 
+test_expect_success 'git log --no-notes resets default state' '
+       git log -1 --notes --notes=alternate \
+               --no-notes --notes=alternate \
+               >output &&
+       ! grep xyzzy output &&
+       grep alternate output
+'
+
+test_expect_success 'git log --no-notes resets ref list' '
+       git log -1 --notes --notes=alternate \
+               --no-notes --notes \
+               >output &&
+       grep xyzzy output &&
+       ! grep alternate output
+'
+
 test_expect_success 'create -m notes (setup)' '
        : > a5 &&
        git add a5 &&