summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-31 22:39:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-31 22:39:10 (GMT)
commite95c3fb54fd43b5fca47bcfd946c3a009752cf3a (patch)
tree9babbe452473cf3f074df8ebc08b19aa9a36cf29 /t
parentb21089db6a6006bcf9233f0d8592044ca5553c6a (diff)
parent2bd07065c3ed8a1bd2dc6f5d8e914dfec31e3dca (diff)
downloadgit-e95c3fb54fd43b5fca47bcfd946c3a009752cf3a.zip
git-e95c3fb54fd43b5fca47bcfd946c3a009752cf3a.tar.gz
git-e95c3fb54fd43b5fca47bcfd946c3a009752cf3a.tar.bz2
Merge branch 'sg/describe-contains'
"git describe" without argument defaulted to describe the HEAD commit, but "git describe --contains" didn't. Arguably, in a repository used for active development, such defaulting would not be very useful as the tip of branch is typically not tagged, but it is better to be consistent. * sg/describe-contains: describe --contains: default to HEAD when no commit-ish is given
Diffstat (limited to 't')
-rwxr-xr-xt/t6120-describe.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index c0e5b2a..85f2694 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -113,6 +113,14 @@ check_describe A-3-* --long HEAD^^2
check_describe c-7-* --tags
check_describe e-3-* --first-parent --tags
+test_expect_success 'describe --contains defaults to HEAD without commit-ish' '
+ echo "A^0" >expect &&
+ git checkout A &&
+ test_when_finished "git checkout -" &&
+ git describe --contains >actual &&
+ test_cmp expect actual
+'
+
: >err.expect
check_describe A --all A^0
test_expect_success 'no warning was displayed for A' '