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>

Sebastian Staudt committed Feb 3, 2019 at 07:00 UTC c801170b0cbc3fdd44331a53c2b7649687625680
1 file changed +6
t/t6120-describe.sh
+6
@@ -144,6 +144,12 @@ test_expect_success 'rename tag Q back to A' '
144 test_expect_success 'pack tag refs' 'git pack-refs'
145 check_describe A-* HEAD
146
147 +test_expect_success 'describe works from outside repo using --git-dir' '
148 + git clone --bare "$TRASH_DIRECTORY" "$TRASH_DIRECTORY/bare" &&
149 + git --git-dir "$TRASH_DIRECTORY/bare" describe >out &&
150 + grep "^A-[1-9][0-9]\?-g[0-9a-f]\+$" out
151 +'
152 +
153 check_describe "A-*[0-9a-f]" --dirty
154
155 test_expect_success 'describe --dirty with --work-tree' '