diff mbox series

[v3,3/3] Add test for describe with a bare repository

Message ID 20190129051859.12830-3-koraktor@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/3] Add tests for describe with --work-tree | expand

Commit Message

Sebastian Staudt Jan. 29, 2019, 5:18 a.m. UTC
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>
---
 t/t6120-describe.sh | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Jeff King Jan. 29, 2019, 1:12 p.m. UTC | #1
On Tue, Jan 29, 2019 at 06:18:59AM +0100, Sebastian Staudt wrote:

> This ensures that nothing breaks the basic functionality of describe for
> bare repositories. Please note that --broken and --dirty need a working
> tree.

Makes sense.

> +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
> +"

What the test is doing seems sane, but the same quoting comments from
the earlier patch apply.

-Peff
Sebastian Staudt Jan. 30, 2019, 10:23 a.m. UTC | #2
Am Di., 29. Jan. 2019 um 14:12 Uhr schrieb Jeff King <peff@peff.net>:
>
> On Tue, Jan 29, 2019 at 06:18:59AM +0100, Sebastian Staudt wrote:
>
> > This ensures that nothing breaks the basic functionality of describe for
> > bare repositories. Please note that --broken and --dirty need a working
> > tree.
>
> Makes sense.
>
> > +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
> > +"
>
> What the test is doing seems sane, but the same quoting comments from
> the earlier patch apply.
>

Ok, thanks.

> -Peff
diff mbox series

Patch

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