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

Re: git-bisect not working correctly in the kvm.git repository?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Nov 17, 2008, 19:34 UTC
Message-ID
<alpine.LFD.2.00.0811171131330.18283@nehalem.linux-foundation.org>
In-Reply-To
<gfs9hn$hq9$1@ger.gmane.org>
On Mon, 17 Nov 2008, walt wrote:
Show 7 quoted lines
>
> I'm trying to find a bug introduced somewhere between kvm-69
> and kvm-70, so of course I want to git-bisect down to it.
> 
> The weirdness is that when I give git-bisect the good and
> bad tags, almost everything in my working directory just
> disappears, leaving only the qemu subdirectory behind.
Have you done subdirectory merges or other odd merges?

If you merge stuff from another project that isn't a full repository, then you are merging commits that simply don't _have_ the full tree of your repo. If you then bisect into those commits, the checkout will then (of course) end up having only the files that are in that partial tree.

This will happen in the git repository too, if "git bisect" ends up jumping into one of the commits that were done in the 'gitk' repository.

For an example of this, do something like
	git clean -dqfx
	git checkout -b oddbranch eb33a67f218b612f6fb1456e19b40a1f97ff02c0

in the git repository, and see all files disappear, and gitk is no longer in the 'gitk-git' subdirectory, but got moved to the top level.

Because in the history that is that commit, that is literally how things were. The data from that commit just got merged into a subdirectory of its own, and together with all the rest of git, by using a subtree merge.

			Linus
Previous: waltNext: walt
Message 2 of 9 in “git-bisect not working correctly in the kvm.git repository?”
  1. waltNov 17, 2008
  2. Linus TorvaldsNov 17, 2008
  3. waltNov 17, 2008
  4. Linus TorvaldsNov 17, 2008
  5. Johannes SixtNov 18, 2008
  6. Avi KivityNov 18, 2008
  7. Christian CouderNov 17, 2008
  8. waltNov 17, 2008
  9. Christian CouderNov 18, 2008

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.