diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-21 05:39:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-21 05:39:16 -0700 |
commit | 1b9fa0e81134df5c067efc1e3413f05c9e5043f8 (patch) | |
tree | 7a55681b9fa624afb3768e363412d49b8871fd23 /t | |
parent | 6f79d6689193dad107b9424e9bd699d20c7d5c33 (diff) | |
parent | 1a3eb9a0325fc1d1d168b517210b7760d31d3022 (diff) | |
download | git-1b9fa0e81134df5c067efc1e3413f05c9e5043f8.tar.gz |
Merge branch 'jn/notes-doc' into maint
* jn/notes-doc:
Documentation/notes: nitpicks
Documentation/notes: clean up description of rewriting configuration
Documentation/notes: simplify treatment of default display refs
Documentation/log: add a CONFIGURATION section
Documentation/notes: simplify treatment of default notes ref
Documentation/notes: add configuration section
Documentation/notes: describe content of notes blobs
Documentation/notes: document format of notes trees
Diffstat (limited to 't')
-rwxr-xr-x | t/t3307-notes-man.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/t/t3307-notes-man.sh b/t/t3307-notes-man.sh new file mode 100755 index 0000000000..3269f2eebd --- /dev/null +++ b/t/t3307-notes-man.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +test_description='Examples from the git-notes man page + +Make sure the manual is not full of lies.' + +. ./test-lib.sh + +test_expect_success 'setup' ' + test_commit A && + test_commit B && + test_commit C +' + +test_expect_success 'example 1: notes to add an Acked-by line' ' + cat <<-\EOF >expect && + B + + Notes: + Acked-by: A C Ker <acker@example.com> + EOF + git notes add -m "Acked-by: A C Ker <acker@example.com>" B && + git show -s B^{commit} >log && + tail -n 4 log >actual && + test_cmp expect actual +' + +test_expect_success 'example 2: binary notes' ' + cp "$TEST_DIRECTORY"/test4012.png . + git checkout B && + blob=$(git hash-object -w test4012.png) && + git notes --ref=logo add -C "$blob" && + git notes --ref=logo copy B C && + git notes --ref=logo show C >actual && + test_cmp test4012.png actual +' + +test_done |