git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 2/2] t6120: test for describe with a bare repository

From
Sebastian Staudt <koraktor@gmail.com>
Date
Feb 2, 2019, 10:00 UTC
Message-ID
<CA+xP2SZ96XqZbCtub9SkxPUNTUVeNZOcXxYvwhMitLgiCVmchg@mail.gmail.com>
In-Reply-To
<xmqq7eejz6fs.fsf@gitster-ct.c.googlers.com>
Am Fr., 1. Feb. 2019 um 19:53 Uhr schrieb Junio C Hamano <gitster@pobox.com>:
Show 27 quoted lines
>
> Sebastian Staudt <koraktor@gmail.com> writes:
>
> > 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(+)
> >
> > diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
> > index 7cfed77c52..ea2c3dbe1c 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
> > +'
>
> OK, it demonstrates that the command exits with status 0.  Do we
> want to validate its output, too?

It won‘t hurt. I‘ll move this test further up, so it is executed when the working tree is still clean. That way we can use the same regex as for the other checks.

Thanks.
Previous: Junio C HamanoNext: Eric Sunshine
Message 4 of 8 in “describe: setup working tree for --dirty”
  1. 1/2 describe: setup working tree for --dirtySebastian Staudt, Feb 1, 2019
  2. 2/2 t6120: test for describe with a bare repositorySebastian Staudt, Feb 1, 2019
  3. Junio C HamanoFeb 1, 2019
  4. Sebastian StaudtFeb 2, 2019
  5. Eric SunshineFeb 1, 2019
  6. Sebastian StaudtFeb 2, 2019
  7. Eric SunshineFeb 3, 2019
  8. Junio C HamanoFeb 1, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.