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

Re: [PATCH v2 2/3] Setup working tree in describe

From
Sebastian Staudt <koraktor@gmail.com>
Date
Jan 27, 2019, 07:19 UTC
Message-ID
<CA+xP2SYk-NtvQf3c6ahwdO-W5zfV6D+h-oQOmkuqee=ZsEHHTw@mail.gmail.com>
In-Reply-To
<CACsJy8A+QsSDfL_RX2ctNsV35VpBaSp4M7hR00nSObmmULUmvg@mail.gmail.com>
Am So., 27. Jan. 2019 um 01:22 Uhr schrieb Duy Nguyen <pclouds@gmail.com>:
Show 13 quoted lines
>
> On Sun, Jan 27, 2019 at 3:51 AM Sebastian Staudt <koraktor@gmail.com> wrote:
> >
> > This ensures the given working tree is used for --dirty.
> >
> > The implementation of --broken uses diff-index which calls
> > setup_work_tree() itself.
>
> It would be nice to have a test case covering --broken even if no fix
> is needed (so that somebody else will not accidentally break it
> later). I did a quick test and thought it was broken, but it turns out
> I tested it wrong :P
>

There‘s only one test ("describe ignoring a broken submodule") which effectively tests --broken. I could reuse this.

BTW, is "describe ignoring a broken submodule" the right description here? In fact, this should probably be named "describe detects a broken submodule".

Show 24 quoted lines
> > Signed-off-by: Sebastian Staudt <koraktor@gmail.com>
> > ---
> >  builtin/describe.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/builtin/describe.c b/builtin/describe.c
> > index cc118448ee..b5b7abdc8f 100644
> > --- a/builtin/describe.c
> > +++ b/builtin/describe.c
> > @@ -629,6 +629,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
> >                         struct argv_array args = ARGV_ARRAY_INIT;
> >                         int fd, result;
> >
> > +                       setup_work_tree();
> >                         read_cache();
> >                         refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED,
> >                                       NULL, NULL, NULL);
> > --
> > 2.20.1
> >
>
>
> --
> Duy
Previous: Duy NguyenNext: Sebastian Staudt
Message 4 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.