Re: [PATCH][OUTREACHY] bisect: allow `git bisect` to run from subdirectory
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 21, 2020, 19:53 UTC
- Message-ID
- <xmqqr1pr73ve.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20201021162044.GB111581@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 9 quoted lines
> I'm not sure that that's the case: Junio pointed out a while[1] ago that > we'd have to answer the question of "what happens if I'm in a > subdirectory that goes away during some point of the bisection?". I > think that you could probably find an answer to that question, but the > fact that there isn't an obvious one seems to indicate that we're going > down the wrong path. > > I agree that it would be nice to run bisect from any directory, but it > may not be as easy as I'd hope.
True.
I would not mind all that much a single "git checkout ancient" that makes the $cwd go away and confuse the user. But a bisect session would jump around versions randomly (eh, logarithmically?) and you'd end up switching out of a version in a non-existing $cwd to another version that has the directory (created internally by mkdir(2)), and I'm fairly certain that your phantom $cwd that is not connected to any other filesystem entity and the directory that should be at the same path in the newly checked-out version are different filesystem entities. I'd rather not have to think about the interaction between git and the system after that point.
Thanks.