summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd067d3)
raw | patch | inline | side by side (parent: cd067d3)
author | Johan Herland <johan@herland.net> | |
Sat, 13 Feb 2010 21:28:21 +0000 (22:28 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 14 Feb 2010 03:36:13 +0000 (19:36 -0800) |
Adds a testcase verifying that git-notes works successfully on
tree, blob, and tag objects.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree, blob, and tag objects.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3301-notes.sh | patch | blob | history |
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 10f62f41223af26f0aca2e21db467a7a7fc93010..fd5e593ae68c4ebec52904c03151dae872767d28 100755 (executable)
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
test_cmp expect-not-other output
'
+test_expect_success 'Allow notes on non-commits (trees, blobs, tags)' '
+ echo "Note on a tree" > expect
+ git notes edit -m "Note on a tree" HEAD: &&
+ git notes show HEAD: > actual &&
+ test_cmp expect actual &&
+ echo "Note on a blob" > expect
+ filename=$(git ls-tree --name-only HEAD | head -n1) &&
+ git notes edit -m "Note on a blob" HEAD:$filename &&
+ git notes show HEAD:$filename > actual &&
+ test_cmp expect actual &&
+ echo "Note on a tag" > expect
+ git tag -a -m "This is an annotated tag" foobar HEAD^ &&
+ git notes edit -m "Note on a tag" foobar &&
+ git notes show foobar > actual &&
+ test_cmp expect actual
+'
+
test_done