summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-03-24 18:40:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-24 19:15:26 (GMT)
commit1e0c3b680c6e7b37fc51bd69a410af01897a4f94 (patch)
treef99815cbeb864c4b174342e1fc6b3bb5b4fac6be /t
parent6a338149f623f493525324bc0f8d7bb9257cb840 (diff)
downloadgit-1e0c3b680c6e7b37fc51bd69a410af01897a4f94.zip
git-1e0c3b680c6e7b37fc51bd69a410af01897a4f94.tar.gz
git-1e0c3b680c6e7b37fc51bd69a410af01897a4f94.tar.bz2
tag: change --point-at to default to HEAD
Change the --points-at option to default to HEAD for consistency with its siblings --contains, --merged etc. which default to HEAD. Previously we'd get: $ git tag --points-at 2>&1 | head -n 1 error: option `points-at' requires a value This changes behavior added in commit ae7706b9ac (tag: add --points-at list option, 2012-02-08). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7004-tag.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 5823de1..3529c30 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1534,7 +1534,8 @@ do
"
test_expect_success "Doing 'git tag --list-like $option <commit> <pattern> is permitted" "
git tag -n $option HEAD HEAD &&
- git tag $option HEAD HEAD
+ git tag $option HEAD HEAD &&
+ git tag $option
"
done
@@ -1546,6 +1547,12 @@ test_expect_success '--points-at can be used in non-list mode' '
test_cmp expect actual
'
+test_expect_success '--points-at is a synonym for --points-at HEAD' '
+ echo v4.0 >expect &&
+ git tag --points-at >actual &&
+ test_cmp expect actual
+'
+
test_expect_success '--points-at finds lightweight tags' '
echo v4.0 >expect &&
git tag --points-at v4.0 >actual &&