Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t3307-notes-man.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t3307-notes-man.sh` 38 lines ยท 836 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='Examples from the git-notes man page 4 5 Make sure the manual is not full of lies.' 6 7 . ./test-lib.sh 8 9 test_expect_success 'setup' ' 10 test_commit A && 11 test_commit B && 12 test_commit C 13 ' 14 15 test_expect_success 'example 1: notes to add an Acked-by line' ' 16 cat <<-\EOF >expect && 17 B 18 19 Notes: 20 Acked-by: A C Ker 21 EOF 22 git notes add -m "Acked-by: A C Ker " B && 23 git show -s B^{commit} >log && 24 tail -n 4 log >actual && 25 test_cmp expect actual 26 ' 27 28 test_expect_success 'example 2: binary notes' ' 29 cp "$TEST_DIRECTORY"/test-binary-1.png . && 30 git checkout B && 31 blob=$(git hash-object -w test-binary-1.png) && 32 git notes --ref=logo add -C "$blob" && 33 git notes --ref=logo copy B C && 34 git notes --ref=logo show C >actual && 35 test_cmp test-binary-1.png actual 36 ' 37 38 test_done