Merge branch 'jk/notes-ui-updates'
* jk/notes-ui-updates: contrib/completion: --notes, --no-notes log/pretty-options: Document --[no-]notes and deprecate old notes options revision.c: make --no-notes reset --notes list revision.c: support --notes command-line option notes: refactor display notes default handling notes: refactor display notes extra refs field revision.c: refactor notes ref expansion notes: make expand_notes_ref globally accessible
This commit is contained in:
@ -272,6 +272,44 @@ do
|
||||
'
|
||||
done
|
||||
|
||||
test_expect_success 'setup alternate notes ref' '
|
||||
git notes --ref=alternate add -m alternate
|
||||
'
|
||||
|
||||
test_expect_success 'git log --notes shows default notes' '
|
||||
git log -1 --notes >output &&
|
||||
grep xyzzy output &&
|
||||
! grep alternate output
|
||||
'
|
||||
|
||||
test_expect_success 'git log --notes=X shows only X' '
|
||||
git log -1 --notes=alternate >output &&
|
||||
! grep xyzzy output &&
|
||||
grep alternate output
|
||||
'
|
||||
|
||||
test_expect_success 'git log --notes --notes=X shows both' '
|
||||
git log -1 --notes --notes=alternate >output &&
|
||||
grep xyzzy output &&
|
||||
grep alternate output
|
||||
'
|
||||
|
||||
test_expect_success 'git log --no-notes resets default state' '
|
||||
git log -1 --notes --notes=alternate \
|
||||
--no-notes --notes=alternate \
|
||||
>output &&
|
||||
! grep xyzzy output &&
|
||||
grep alternate output
|
||||
'
|
||||
|
||||
test_expect_success 'git log --no-notes resets ref list' '
|
||||
git log -1 --notes --notes=alternate \
|
||||
--no-notes --notes \
|
||||
>output &&
|
||||
grep xyzzy output &&
|
||||
! grep alternate output
|
||||
'
|
||||
|
||||
test_expect_success 'create -m notes (setup)' '
|
||||
: > a5 &&
|
||||
git add a5 &&
|
||||
|
Reference in New Issue
Block a user