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

Re: [PATCH v4 1/2] describe: setup working tree for --dirty

From
Sebastian Staudt <koraktor@gmail.com>
Date
Feb 2, 2019, 10:04 UTC
Message-ID
<CA+xP2Sa2zLeLg-6pFn9UEufurd=EOOf8UFx3Qh7o0dwzJgN-ag@mail.gmail.com>
In-Reply-To
<CAPig+cQgEVJ6OGn9BRUJoALxE7aDCHK308sq7V0EQVRRn6Vn8g@mail.gmail.com>

Am Fr., 1. Feb. 2019 um 21:12 Uhr schrieb Eric Sunshine <sunshine@sunshineco.com>:

Show 28 quoted lines
>
> On Fri, Feb 1, 2019 at 8:55 AM Sebastian Staudt <koraktor@gmail.com> wrote:
> > We don't use NEED_WORK_TREE when running the git-describe builtin,
> > since you should be able to describe a commit even in a bare repository.
> > However, the --dirty flag does need a working tree. Since we don't call
> > setup_work_tree(), it uses whatever directory we happen to be in. That's
> > unlikely to match our index, meaning we'd say "dirty" even when the real
> > working tree is clean.
> > [...]
> > Signed-off-by: Sebastian Staudt <koraktor@gmail.com>
> > ---
> > diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
> > @@ -145,14 +145,38 @@ check_describe A-* HEAD
> > +test_expect_success 'describe --dirty with --work-tree' '
> > +       [...]
> > +'
> >
> > +test_expect_success 'describe --dirty with --work-tree' '
> > +       [...]
> > +'
>
> Can you give these two new tests different titles to make it easier to
> narrow down a problem to one or the other if one of them does fail?
> Perhaps the second test could be titled:
>
>     test_expect_success 'describe --dirty with dirty --work-tree' '
>
> or something.

Thanks, didn‘t notice this. I‘d use a suffix (dirty) for my test titles. But this won‘t work for tests using check_describe(). Any objections?

Previous: Eric SunshineNext: Eric Sunshine
Message 6 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.