summaryrefslogtreecommitdiff
path: root/t/t6120-describe.sh
diff options
context:
space:
mode:
authorSebastian Staudt <koraktor@gmail.com>2019-02-03 06:00:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-04 18:27:57 (GMT)
commitc801170b0cbc3fdd44331a53c2b7649687625680 (patch)
treec5682e2d88bf623f643d4431215afe9f58d53de9 /t/t6120-describe.sh
parent2ed5c8e174dae73459df11386dc83e8ef4154e3f (diff)
downloadgit-c801170b0cbc3fdd44331a53c2b7649687625680.zip
git-c801170b0cbc3fdd44331a53c2b7649687625680.tar.gz
git-c801170b0cbc3fdd44331a53c2b7649687625680.tar.bz2
t6120: test for describe with a bare repository
This ensures that nothing breaks the basic functionality of describe for bare repositories. Please note that --broken and --dirty need a working tree. Signed-off-by: Sebastian Staudt <koraktor@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6120-describe.sh')
-rwxr-xr-xt/t6120-describe.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 7da57db..1b8690a 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -144,6 +144,12 @@ test_expect_success 'rename tag Q back to A' '
test_expect_success 'pack tag refs' 'git pack-refs'
check_describe A-* HEAD
+test_expect_success 'describe works from outside repo using --git-dir' '
+ git clone --bare "$TRASH_DIRECTORY" "$TRASH_DIRECTORY/bare" &&
+ git --git-dir "$TRASH_DIRECTORY/bare" describe >out &&
+ grep "^A-[1-9][0-9]\?-g[0-9a-f]\+$" out
+'
+
check_describe "A-*[0-9a-f]" --dirty
test_expect_success 'describe --dirty with --work-tree' '