summaryrefslogtreecommitdiff
path: root/t/t3301-notes.sh
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2015-09-22 22:15:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-09-22 22:24:01 (GMT)
commite14c92e841fd6d99c8c17af05a411a85ac212254 (patch)
tree7f8ec8f99501d78fe43bcdc5882c30f745c9ff1c /t/t3301-notes.sh
parentee6ad5f4d56e697c972af86cbefdf269b386e470 (diff)
downloadgit-e14c92e841fd6d99c8c17af05a411a85ac212254.zip
git-e14c92e841fd6d99c8c17af05a411a85ac212254.tar.gz
git-e14c92e841fd6d99c8c17af05a411a85ac212254.tar.bz2
notes: correct documentation of DWIMery for notes references
expand_notes_ref is used by --ref from git-notes(1) and --notes from the git log to find the full refname of a notes reference. Previously the documentation of these options was not clear about what sorts of expansions would be performed. Fix the documentation to clearly and accurately describe the behavior of the expansions. Add a test for this expansion when using git notes get-ref in order to prevent future patches from changing this behavior. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3301-notes.sh')
-rwxr-xr-xt/t3301-notes.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 8cffd35..cd70274 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -1122,6 +1122,12 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '
test_must_fail git notes copy one two three
'
+test_expect_success 'git notes get-ref expands refs/heads/master to refs/notes/refs/heads/master' '
+ test_unconfig core.notesRef &&
+ sane_unset GIT_NOTES_REF &&
+ test "$(git notes --ref=refs/heads/master get-ref)" = "refs/notes/refs/heads/master"
+'
+
test_expect_success 'git notes get-ref (no overrides)' '
test_unconfig core.notesRef &&
sane_unset GIT_NOTES_REF &&