summaryrefslogtreecommitdiff
path: root/t/t6120-describe.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-29 23:11:22 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-29 23:11:22 -0800
commit44148f2daf6e1ac3fe087dd07da2930411b3bcf2 (patch)
treedd8fa69cd7023f8cb1f4fd517701272fcb6e4f94 /t/t6120-describe.sh
parentbuiltin-merge.c: call exclude_cmds() correctly. (diff)
parentUpdate draft release notes to 1.6.6 before merging topics for -rc1 (diff)
downloadtgif-44148f2daf6e1ac3fe087dd07da2930411b3bcf2.tar.xz
Merge remote branch 'ko/master' into HEAD
* ko/master: (366 commits) Update draft release notes to 1.6.6 before merging topics for -rc1 Makefile: do not clean arm directory Add a notice that only certain functions can print color escape codes builtin-apply.c: pay attention to -p<n> when determining the name gitworkflows: Consistently back-quote git commands Explicitly truncate bswap operand to uint32_t t1200: fix a timing dependent error Documentation: update descriptions of revision options related to '--bisect' Enable support for IPv6 on MinGW Refactor winsock initialization into a separate function t/gitweb-lib: Split HTTP response with non-GNU sed pack-objects: split implications of --all-progress from progress activation instaweb: restart server if already running prune-packed: only show progress when stderr is a tty remote-curl.c: fix rpc_out() Protect scripted Porcelains from GREP_OPTIONS insanity mergetool--lib: simplify guess_merge_tool() strbuf_add_wrapped_text(): skip over colour codes t4014-format-patch: do not assume 'test' is available as non-builtin Fix over-simplified documentation for 'git log -z' ...
Diffstat (limited to 't/t6120-describe.sh')
-rwxr-xr-xt/t6120-describe.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 8c7e081c53..065deadc29 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -34,6 +34,8 @@ test_expect_success setup '
echo one >file && git add file && git commit -m initial &&
one=$(git rev-parse HEAD) &&
+ git describe --always HEAD &&
+
test_tick &&
echo two >file && git add file && git commit -m second &&
two=$(git rev-parse HEAD) &&
@@ -90,12 +92,18 @@ check_describe A-* HEAD^
check_describe D-* HEAD^^
check_describe A-* HEAD^^2
check_describe B HEAD^^2^
+check_describe D-* HEAD^^^
check_describe c-* --tags HEAD
check_describe c-* --tags HEAD^
check_describe e-* --tags HEAD^^
check_describe c-* --tags HEAD^^2
check_describe B --tags HEAD^^2^
+check_describe e --tags HEAD^^^
+
+check_describe heads/master --all HEAD
+check_describe tags/c-* --all HEAD^
+check_describe tags/e --all HEAD^^^
check_describe B-0-* --long HEAD^^2^
check_describe A-3-* --long HEAD^^2
@@ -123,6 +131,20 @@ test_expect_success 'rename tag Q back to A' '
test_expect_success 'pack tag refs' 'git pack-refs'
check_describe A-* HEAD
+check_describe "A-*[0-9a-f]" --dirty
+
+test_expect_success 'set-up dirty work tree' '
+ echo >>file
+'
+
+check_describe "A-*[0-9a-f]-dirty" --dirty
+
+check_describe "A-*[0-9a-f].mod" --dirty=.mod
+
+test_expect_success 'describe --dirty HEAD' '
+ test_must_fail git describe --dirty HEAD
+'
+
test_expect_success 'set-up matching pattern tests' '
git tag -a -m test-annotated test-annotated &&
echo >>file &&