File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 206
206
'
207
207
done
208
208
209
+ test_expect_success ' create other note on a different notes ref (setup)' '
210
+ : > a5 &&
211
+ git add a5 &&
212
+ test_tick &&
213
+ git commit -m 5th &&
214
+ GIT_NOTES_REF="refs/notes/other" git notes edit -m "other note"
215
+ '
216
+
217
+ cat > expect-other << EOF
218
+ commit bd1753200303d0a0344be813e504253b3d98e74d
219
+ Author: A U Thor <[email protected] >
220
+ Date: Thu Apr 7 15:17:13 2005 -0700
221
+
222
+ 5th
223
+
224
+ Notes:
225
+ other note
226
+ EOF
227
+
228
+ cat > expect-not-other << EOF
229
+ commit bd1753200303d0a0344be813e504253b3d98e74d
230
+ Author: A U Thor <[email protected] >
231
+ Date: Thu Apr 7 15:17:13 2005 -0700
232
+
233
+ 5th
234
+ EOF
235
+
236
+ test_expect_success ' Do not show note on other ref by default' '
237
+ git log -1 > output &&
238
+ test_cmp expect-not-other output
239
+ '
240
+
241
+ test_expect_success ' Do show note when ref is given in GIT_NOTES_REF' '
242
+ GIT_NOTES_REF="refs/notes/other" git log -1 > output &&
243
+ test_cmp expect-other output
244
+ '
245
+
246
+ test_expect_success ' Do show note when ref is given in core.notesRef config' '
247
+ git config core.notesRef "refs/notes/other" &&
248
+ git log -1 > output &&
249
+ test_cmp expect-other output
250
+ '
251
+
252
+ test_expect_success ' Do not show note when core.notesRef is overridden' '
253
+ GIT_NOTES_REF="refs/notes/wrong" git log -1 > output &&
254
+ test_cmp expect-not-other output
255
+ '
256
+
209
257
test_done
You can’t perform that action at this time.
0 commit comments