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' '
55
55
git notes show ; test 1 = $?
56
56
'
57
57
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
+
58
67
test_expect_success ' create notes' '
59
68
git config core.notesRef refs/notes/commits &&
60
69
MSG=b4 git notes add &&
@@ -65,6 +74,15 @@ test_expect_success 'create notes' '
65
74
test_must_fail git notes show HEAD^
66
75
'
67
76
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
+
68
86
cat > expect << EOF
69
87
d423f8c refs/notes/commits@{0}: notes: Notes added by 'git notes add'
70
88
EOF
You can’t perform that action at this time.
0 commit comments