X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3301-notes.sh;h=dc2e04a0161c8d6b3f6eefc1873852a377a26393;hb=657072f3ac5519f146a947253c9959909b38c293;hp=7e84ab97903a890a7d9fabc304cad7531e9b915b;hpb=f04aa35eb6117d99f5abf9630961b2c2651d3ed1;p=git.git diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index 7e84ab979..dc2e04a01 100755 --- a/t/t3301-notes.sh +++ b/t/t3301-notes.sh @@ -962,6 +962,7 @@ Date: Thu Apr 7 15:27:13 2005 -0700 Notes (other): a fresh note +$whitespace another fresh note EOF @@ -983,8 +984,11 @@ Date: Thu Apr 7 15:27:13 2005 -0700 Notes (other): a fresh note +$whitespace another fresh note +$whitespace append 1 +$whitespace append 2 EOF @@ -1061,4 +1065,23 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' ' test_must_fail git notes copy one two three ' +test_expect_success 'git notes get-ref (no overrides)' ' + git config --unset core.notesRef && + unset GIT_NOTES_REF && + test "$(git notes get-ref)" = "refs/notes/commits" +' + +test_expect_success 'git notes get-ref (core.notesRef)' ' + git config core.notesRef refs/notes/foo && + test "$(git notes get-ref)" = "refs/notes/foo" +' + +test_expect_success 'git notes get-ref (GIT_NOTES_REF)' ' + test "$(GIT_NOTES_REF=refs/notes/bar git notes get-ref)" = "refs/notes/bar" +' + +test_expect_success 'git notes get-ref (--ref)' ' + test "$(GIT_NOTES_REF=refs/notes/bar git notes --ref=baz get-ref)" = "refs/notes/baz" +' + test_done