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

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

From
Roland Hieber <rhi@pengutronix.de>
Date
Jun 21, 2021, 09:33 UTC
Message-ID
<20210621093310.eqt3ajic64pgag44@pengutronix.de>
In-Reply-To
<CAPig+cQa3JC-YkGeB-NDy-iP=Mv8BRL6jyXTGXzaqpTLcxj8+w@mail.gmail.com>
On Sun, Jun 20, 2021 at 10:10:10PM -0400, Eric Sunshine wrote:
Show 27 quoted lines
> On Sun, Jun 20, 2021 at 10:00 PM brian m. carlson
> <sandals@crustytoothpaste.net> 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.
> 
> Here are a couple recent threads triggered by previous such patches
> (but there are probably several more):
> 
> https://lore.kernel.org/git/pull.765.git.1603271344522.gitgitgadget@gmail.com/
> https://lore.kernel.org/git/pull.736.git.git.1584868547682.gitgitgadget@gmail.com/

Ah, thanks for explaining the problem. Would a patch that adds a short explanatory comment in git-bisect.sh on the matter help to prevent people sending such patches?

 - Roland
-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |
Previous: Eric SunshineNext: Ævar Arnfjörð Bjarmason
Message 5 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.