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

Re: [PATCH v2 3/3] Add test for describe with a bare repository

From
Sebastian Staudt <koraktor@gmail.com>
Date
Jan 27, 2019, 06:54 UTC
Message-ID
<CA+xP2SahEsQKxmjasA5XjuaEVNjbRNiKQv9uKkFkWoORv7WAXQ@mail.gmail.com>
In-Reply-To
<CACsJy8C27hKNTyGE5P+F6nzszN_z85chEq8MvQ+BgiDAi=4jww@mail.gmail.com>
Am So., 27. Jan. 2019 um 01:25 Uhr schrieb Duy Nguyen <pclouds@gmail.com>:
Show 24 quoted lines
>
> On Sun, Jan 27, 2019 at 3:51 AM Sebastian Staudt <koraktor@gmail.com> wrote:
> >
> > 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 | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
> > index 9a6bd1541f..ddd8cc307d 100755
> > --- a/t/t6120-describe.sh
> > +++ b/t/t6120-describe.sh
> > @@ -409,4 +409,11 @@ 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' "
> > +  BARE_CLONE=$(mktemp -d) &&
>
> No, keep everything in $TRASH_DIRECTORY so it will be automatically cleaned.

Looks like a relic from trying to get Git to not find an appropriate working tree. $TRASH_DIRECTORY/bare works here, too.

Show 7 quoted lines
>
> > +  git clone --bare '$TRASH_DIRECTORY' \$BARE_CLONE >/Users/koraktor/open-source/others/git/t/out &&
>
> Ehh.. I'm pretty sure I don't have /Users/koraktor on my system :)
> This looks like just debug code, I think you can drop ">.." part for
> all commands.
>

Sorry. A bit embarrassing to leave debugging code in place. I will remove the output redirection and echo.

Show 12 quoted lines
> > +  echo $PWD >/Users/koraktor/open-source/others/git/t/out &&
> > +  git --git-dir \$BARE_CLONE describe 2>&1 >/Users/koraktor/open-source/others/git/t/out
> > +"
> > +
> >  test_done
> > --
> > 2.20.1
> >
>
>
> --
> Duy
Previous: Duy NguyenNext: Duy Nguyen
Message 7 of 11 in “Add tests for describe with --work-tree”
  1. 1/3 Add tests for describe with --work-treeSebastian Staudt, Jan 26, 2019
  2. 2/3 Setup working tree in describeSebastian Staudt, Jan 26, 2019
  3. Duy NguyenJan 27, 2019
  4. Sebastian StaudtJan 27, 2019
  5. 3/3 Add test for describe with a bare repositorySebastian Staudt, Jan 26, 2019
  6. Duy NguyenJan 27, 2019
  7. Sebastian StaudtJan 27, 2019
  8. Duy NguyenJan 27, 2019
  9. Sebastian StaudtJan 27, 2019
  10. Duy NguyenJan 28, 2019
  11. Junio C HamanoJan 30, 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.