Merge branch 'js/gitweb-raw-blob-link-in-history' into next
[gitweb.git] / t / t3301-notes.sh
index cd70274ea51ac5c5ba6669495b944da5b7b97431..2d200fdf36c62c12cbbf2a964d3489edef401257 100755 (executable)
@@ -83,6 +83,16 @@ test_expect_success 'edit existing notes' '
        test_must_fail git notes show HEAD^
 '
 
+test_expect_success 'show notes from treeish' '
+       test "b3" = "$(git notes --ref commits^{tree} show)" &&
+       test "b4" = "$(git notes --ref commits@{1} show)"
+'
+
+test_expect_success 'cannot edit notes from non-ref' '
+       test_must_fail git notes --ref commits^{tree} edit &&
+       test_must_fail git notes --ref commits@{1} edit
+'
+
 test_expect_success 'cannot "git notes add -m" where notes already exists' '
        test_must_fail git notes add -m "b2" &&
        test_path_is_missing .git/NOTES_EDITMSG &&