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

Re: [PATCH] bisect: allow to run from subdirectories

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 29, 2021, 01:22 UTC
Message-ID
<xmqqtulh31nm.fsf@gitster.g>
In-Reply-To
<YNPGb5gvygs++jlv@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
>> This does not depend on "do we have T as a directory?" being the
>> bisection criteria.  The important thing is that the current
>> directory would appear and disappear as the bisection process makes
>> you jump around in the history.
>
> I think that is a good explanation. But I remain somewhat unconvinced
> that it is that big a problem in practice.

It's just the difference in attitude, I would think. Things like "rebase" take a more liberal attitude and most of the time things work out OK because removal of a directory is a rare event and replacement of a directory with a non-directory is even rarer, but when things break there is no provision to help users to know how it broke by diagnosing why the revision cannot be checked out, or why the directory D the user's shell session is sitting in is now orphaned and different from the directory D the user thinks he is in because it was removed (while the user's process is in there) and then recreated under the same name, or any of the tricky things.

The ideal endgame would be to allow operating from subdirectory *AND* have provisions for helping users when things go wrong because the starting subdirectory goes away. "bisect" works under the more conservative philosophy (start strict and forbid operation that we know we didn't spend any effort to avoid taking the user into dangerous waters---we can allow it later once we make it safer but not until then).

It would involve a bit of chicken-and-egg, I would guess. If we think improving Git is more important than avoiding even occasional failures imposed on end-users, then the more liberal approach would be easier to work with---we can allow the command to start from subdirectory even if we do not do anything to help avoid problems, let the users hit a snag and have them report it, which would give us some concrete failure mode to work on.

Previous: Jeff KingNext: Jeff King
Message 12 of 13 in “bisect: allow to run from subdirectories”
  1. bisect: allow to run from subdirectoriesRoland Hieber, Jun 20, 2021
  2. Ævar Arnfjörð BjarmasonJun 21, 2021
  3. brian m. carlsonJun 21, 2021
  4. Eric SunshineJun 21, 2021
  5. Roland HieberJun 21, 2021
  6. Ævar Arnfjörð BjarmasonJun 21, 2021
  7. Eric SunshineJun 21, 2021
  8. Ævar Arnfjörð BjarmasonJun 22, 2021
  9. brian m. carlsonJun 22, 2021
  10. Junio C HamanoJun 21, 2021
  11. Jeff KingJun 23, 2021
  12. Junio C HamanoJun 29, 2021
  13. Jeff KingJun 29, 2021

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.