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

Re: 'pu' broken at t5304 tonight

From
BWBrandon Williams <bmwill@google.com>
Date
Jun 12, 2017, 18:03 UTC
Message-ID
<20170612180357.GA154599@google.com>
In-Reply-To
<CAP8UFD0nDaBCiWiho7zJtUZ3MpgPY97NQ0AXnGq7parQBi=sMw@mail.gmail.com>
On 06/11, Christian Couder wrote:
Show 30 quoted lines
> On Sat, Jun 10, 2017 at 9:05 PM, Kevin Daudt <me@ikke.info> wrote:
> > On Sat, Jun 10, 2017 at 02:48:36PM +0200, Kevin Daudt wrote:
> 
> >> For me, this bisects to the latest merge:
> >>
> >> 2047eebd3 (Merge branch 'bw/repo-object' into pu, 2017-06-10), but
> >> neither of the parent of the merge break this test, so it looks like
> >> it's because of an interaction between the repo-object topic and another
> >> topic.
> >
> > Merging the repo-object with different other topic branches reveals this
> > topic to cause the bad interaction:
> >
> > b56c91004 (Merge branch 'nd/prune-in-worktree' into pu, 2017-06-10)
> >
> > Still investigating why it happens.
> 
> Yeah, 9570b25a97 (revision.c: --indexed-objects add objects from all
> worktrees, 2017-04-19) adds the following test to t5304-prune.sh but
> this fails if nd/prune-in-worktree is rebased on top of
> bw/repo-object:
> 
> test_expect_success 'prune: handle index in multiple worktrees' '
>        git worktree add second-worktree &&
>        echo "new blob for second-worktree" >second-worktree/blob &&
>        git -C second-worktree add blob &&
>        git prune --expire=now &&
>        git -C second-worktree show :blob >actual &&
>        test_cmp second-worktree/blob actual
> '
I think I discovered what is going on here (and its mostly my fault :D).

(e7a6a3b15 revision.c: --indexed-objects add objects from all worktrees) queries each worktree's index to add object which are pending in the per-worktree index's. To do this is uses 'worktree_git_path' in order to construct a path to the worktree's index file. My series introduced a change to how 'adjust_git_path' functioned, instead of checking if the index file came from the environment before replacing with the result of 'get_index_file()', i change it to unconditionally do this replacing which breaks the ability to get a path to a worktree's index.

So this breakage is definitely my fault, but you would still run into this exact same issue if you had set 'GIT_INDEX_FILE' as no worktree's would be able to find their index files as they would be overridden by the envvar.

-- 
Brandon Williams
Previous: Christian Couder
Message 5 of 5 in “'pu' broken at t5304 tonight”
  1. Junio C HamanoJun 10, 2017
  2. Kevin DaudtJun 10, 2017
  3. Kevin DaudtJun 10, 2017
  4. Christian CouderJun 11, 2017
  5. Brandon WilliamsJun 12, 2017

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.