File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,15 @@ test_expect_success 'handle empty notes gracefully' '
5555 git notes show ; test 1 = $?
5656'
5757
58+ test_expect_success ' show non-existent notes entry with %N' '
59+ for l in A B
60+ do
61+ echo "$l"
62+ done >expect &&
63+ git show -s --format=' A%n%NB' >output &&
64+ test_cmp expect output
65+ '
66+
5867test_expect_success ' create notes' '
5968 git config core.notesRef refs/notes/commits &&
6069 MSG=b4 git notes add &&
@@ -65,6 +74,15 @@ test_expect_success 'create notes' '
6574 test_must_fail git notes show HEAD^
6675'
6776
77+ test_expect_success ' show notes entry with %N' '
78+ for l in A b4 B
79+ do
80+ echo "$l"
81+ done >expect &&
82+ git show -s --format=' A%n%NB' >output &&
83+ test_cmp expect output
84+ '
85+
6886cat > expect << EOF
6987d423f8c refs/notes/commits@{0}: notes: Notes added by 'git notes add'
7088EOF
You can’t perform that action at this time.
0 commit comments