X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3304-notes-mixed.sh;h=1709e8c00b859ae4f8ce91c7920a9411ac4acbce;hb=ca02ad3447efdbd4cb2aa9ba0ee3fc6124035274;hp=256687ffb53aef91666561bd91e0188ff62d8690;hpb=ad336054068074ed614d0bb54bb169e5263499d7;p=git.git diff --git a/t/t3304-notes-mixed.sh b/t/t3304-notes-mixed.sh index 256687ffb..1709e8c00 100755 --- a/t/t3304-notes-mixed.sh +++ b/t/t3304-notes-mixed.sh @@ -131,6 +131,17 @@ data <expect_nn3 <expect_nn4 < actual_nn2 && test_cmp expect_nn2 actual_nn2 && git cat-file -p refs/notes/commits:de/adbeef > actual_nn3 && - test_cmp expect_nn3 actual_nn3 + test_cmp expect_nn3 actual_nn3 && + git cat-file -p refs/notes/commits:dead/beef > actual_nn4 && + test_cmp expect_nn4 actual_nn4 +' + +test_expect_success "git-notes preserves non-notes" ' + + test_tick && + git notes add -f -m "foo bar" +' + +test_expect_success "verify contents of non-notes after git-notes" ' + + git cat-file -p refs/notes/commits:foobar/non-note.txt > actual_nn1 && + test_cmp expect_nn1 actual_nn1 && + git cat-file -p refs/notes/commits:deadbeef > actual_nn2 && + test_cmp expect_nn2 actual_nn2 && + git cat-file -p refs/notes/commits:de/adbeef > actual_nn3 && + test_cmp expect_nn3 actual_nn3 && + git cat-file -p refs/notes/commits:dead/beef > actual_nn4 && + test_cmp expect_nn4 actual_nn4 ' test_done