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

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

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 21, 2021, 00:35 UTC
Message-ID
<877dio3vg5.fsf@evledraar.gmail.com>
In-Reply-To
<20210620213836.10771-1-rhi@pengutronix.de>
On Sun, Jun 20 2021, Roland Hieber wrote:
Show 27 quoted lines
> 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.
>
> After a glance through the bisect code, there seems to be nothing that
> relies on the current working directory, and a few hours of bisect usage
> also didn't turn up any problems. Set the appropriate flag for
> git-sh-setup to remove the error message.
>
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  git-bisect.sh | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/git-bisect.sh b/git-bisect.sh
> index 6a7afaea8da0..20ba0ee7c18a 100755
> --- a/git-bisect.sh
> +++ b/git-bisect.sh
> @@ -32,6 +32,7 @@ git bisect run <cmd>...
>  Please use "git help bisect" to get the full man page.'
>  
>  OPTIONS_SPEC=
> +SUBDIRECTORY_OK=1
>  . git-sh-setup
>  
>  _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'

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?

Previous: Roland HieberNext: brian m. carlson
Message 2 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.