summaryrefslogtreecommitdiff
path: root/t/t3301-notes.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-02 22:58:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-02 22:58:50 (GMT)
commit23f536cf6236bf2a29026fea52c6bf7624b6485d (patch)
tree2738ba07faa16941f0d0d5dbc19ec39821920754 /t/t3301-notes.sh
parenta75c3523d35144934e97f2660401e05b36ef8083 (diff)
parent3925b575687f64d49bd777ba6f64557a56b838b6 (diff)
downloadgit-23f536cf6236bf2a29026fea52c6bf7624b6485d.zip
git-23f536cf6236bf2a29026fea52c6bf7624b6485d.tar.gz
git-23f536cf6236bf2a29026fea52c6bf7624b6485d.tar.bz2
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
Diffstat (limited to 't/t3301-notes.sh')
-rwxr-xr-xt/t3301-notes.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 3448c23..28e17c8 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -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 &&