On 2021-06-21 at 02:10:10, Eric Sunshine wrote: > On Sun, Jun 20, 2021 at 10:00 PM brian m. carlson > <sandals@xxxxxxxxxxxxxxxxxxxx> wrote: > > On 2021-06-21 at 00:35:49, Ævar Arnfjörð Bjarmason wrote: > > > On Sun, Jun 20 2021, Roland Hieber wrote: > > > > Currently, calling 'git bisect' from a directory other than the top > > > > level of a repository only comes up with an error message: > > > > > > > > You need to run this command from the toplevel of the working tree. > > > > > > How does this affect out-of-tree scripts that will be run with "git > > > bisect run", is the cwd set to the root as they now might expect git to > > > check, or whatever subdirectory you ran the "run" from? > > > > As for the idea itself, I think it's a good one assuming everything > > continues to work. It will certainly be more convenient for a lot of > > people. > > There have been multiple patches sent to the project over the years > with the same purpose. One problem, I believe, which has never been > fully addressed is what happens when the subdirectory from which > git-bisect is run gets deleted as part of the bisection. And that's the thing I was missing. This did seem a little too simple. I think there are certainly cases where we know the directory isn't changing; most of the situations in which I've bisected things in Git, for example. But we will, of course, need to specify the behavior when that's not the case, and as Junio said, it probably will just fail in unexpected ways, and that wouldn't be a helpful user experience. At the very least, we'd need to document the behavior, and ideally try to make it work reasonably gracefully (e.g., by not removing the directory in that case). -- brian m. carlson (he/him or they/them) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature