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@xxxxxxxxx> --- t/t6120-describe.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index c863c4f600..f7539a2650 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -418,4 +418,9 @@ test_expect_success 'describe complains about missing object' ' test_must_fail git describe $ZERO_OID ' +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 +" + test_done -- 2.20.1