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

git-bisect working only from toplevel dir

From
Adam Borowski <kilobyte@angband.pl>
Date
Nov 23, 2011, 14:50 UTC
Message-ID
<20111123145034.GB17927@angband.pl>
Hi!

The requirement to be in the toplevel directory when calling git-bisect is pretty infuriating. I tried to find an explanation for this, and the only reference I found was:

http://thread.gmane.org/gmane.comp.version-control.git/27524/focus=27596

However, since then, git-reset has been changed (in a81c311f). What about changing git-bisect as well?

A trivial patch seems to work for me, but I might have missed some corner case.

-- 
1KB		// Yo momma uses IPv4!


From 1dd5dda6a9db3d987e15784c4de24e593cc596e0 Mon Sep 17 00:00:00 2001
From: Adam Borowski <kilobyte@angband.pl>
Date: Wed, 23 Nov 2011 15:08:42 +0100
Subject: [PATCH] git-bisect: allow using it from a subdirectory.

Just like git-reset, restricting it to toplevel is an annoyance, and the
latter has been changed in a81c311f.
---
 git-bisect.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index 99efbe8..fd6ccdd 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -27,6 +27,7 @@ git bisect run <cmd>...
 Please use "git help bisect" to get the full man page.'
 
 OPTIONS_SPEC=
+SUBDIRECTORY_OK=Yes
 . git-sh-setup
 . git-sh-i18n
 
-- 
1.7.8.rc3.31.g017d1
Next: Junio C Hamano
Message 1 of 11 in “git-bisect working only from toplevel dir”
  1. Adam BorowskiNov 23, 2011
  2. Junio C HamanoNov 23, 2011
  3. Jeff KingNov 23, 2011
  4. Adam BorowskiNov 23, 2011
  5. Jeff KingNov 23, 2011
  6. Peter BaumannNov 23, 2011
  7. Jeff KingNov 23, 2011
  8. Junio C HamanoNov 23, 2011
  9. Peter BaumannNov 24, 2011
  10. Junio C HamanoNov 24, 2011
  11. Jeff KingNov 29, 2011

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.