All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brandon Williams <bmwill@google.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: Kevin Daudt <me@ikke.info>, Junio C Hamano <gitster@pobox.com>,
	git <git@vger.kernel.org>
Subject: Re: 'pu' broken at t5304 tonight
Date: Mon, 12 Jun 2017 11:03:57 -0700	[thread overview]
Message-ID: <20170612180357.GA154599@google.com> (raw)
In-Reply-To: <CAP8UFD0nDaBCiWiho7zJtUZ3MpgPY97NQ0AXnGq7parQBi=sMw@mail.gmail.com>

On 06/11, Christian Couder wrote:
> 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

      reply	other threads:[~2017-06-12 18:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-10  6:07 'pu' broken at t5304 tonight Junio C Hamano
2017-06-10 12:48 ` Kevin Daudt
2017-06-10 19:05   ` Kevin Daudt
2017-06-11  4:13     ` Christian Couder
2017-06-12 18:03       ` Brandon Williams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170612180357.GA154599@google.com \
    --to=bmwill@google.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ikke.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.