Questions tagged [git-bisect]

git-bisect is part of the git CM software. It is used to find which change broke something.

101 questions
11
votes
2 answers

How to get rid of "refs/bisect/bad" branches in Git

I have the following in my ~/.gitconfig (this is only here to help you understand what I'm looking at): [alias] lg = log --graph --all --pretty=format:'%Cred%h %Cgreen(%cr)%Creset - %s %C(yellow)%d %C(bold blue)<%an>%Creset' --abbrev-commit…
Kostas
  • 8,356
  • 11
  • 47
  • 63
11
votes
1 answer

How do I get the current "status" of a git bisect?

I am making some personal modifications to oh-my-git (shows the git status on the terminal) and I would like to display the "status" of the current bisect. Specifically, I want to get the number of remaining commits and approximate number of steps…
Compholio
  • 733
  • 1
  • 9
  • 17
11
votes
4 answers

Is it possible to mark a git commit as work-in-progress?

I'm aware that there are various opinions and philosophies about whether or not all commits on the master branch should leave the project in a valid, working state. I'm not asking for these opinions. For the sake of argument, let's assume that…
chtenb
  • 14,924
  • 14
  • 78
  • 116
10
votes
3 answers

How to use git bisect: Using unit tests for determining the errorneous commit?

I'm new to git and just discovered "git bisect". How is it generally used when you can check for the error using a newly written unit test (that wasn't there beforehand)? Say we have a repository containing unit tests, but - as so often - they…
Heinzi
  • 5,793
  • 4
  • 40
  • 69
9
votes
1 answer

git-bisect but for N repos

There is a bug in my code which can be easily reproduced since a test fails. Up to now I used git-bisect in such cases, but it is only useful if there is only one git repo. In my case there are 7. Is there a way to do something like git-bisect but…
guettli
  • 25,042
  • 81
  • 346
  • 663
9
votes
2 answers

Attempting to start git bisect gives 'fatal: invalid reference:...'

Attempting to start a bisect with the following command, git bisect start causes Git to respond: fatal: invalid reference: atrium-3018 What is the cause of this and how can I fix it?
ErichBSchulz
  • 15,047
  • 5
  • 57
  • 61
8
votes
2 answers

How to resume a git bisect

Suppose that I'm going through a git bisect, and after running a git bisect bad command, my git bisect gets interrupted like so: $ git bisect bad Bisecting: 0 revisions left to test after this (roughly 1 step) error: Your local changes to the…
abbood
  • 23,101
  • 16
  • 132
  • 246
8
votes
3 answers

Find where f(x) changes in a list, with bisection (in Python)

Reasoning: I'm trying to implement, in Python, something similar to git bisect, but with basically a list of directories. I have a (long) list of version numbers like this: ['1.0', '1.14', '2.3', '3.1', '4'] I have a function works() which takes a…
Daniel
  • 2,032
  • 5
  • 21
  • 27
8
votes
2 answers

git-bisect, but for N repos

Our software is modular and I have about 20 git repos in one project. If a test fails, it is sometimes hard to find the matching commit since several developers work on these 20 repos. I know the test worked yesterday and fails reproachable…
guettli
  • 25,042
  • 81
  • 346
  • 663
8
votes
1 answer

Git: Equivalent of `--full-history` for `git bisect` and `git blame`

I've been using Git heavily for about 7 years. A few days ago I found a behavior that surprised me. I found git log, git blame and git bisect to exhibit this weird behavior. A friend let me know about the --full-history flag to git log that solved…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
8
votes
2 answers

git bisect with additional patch

Let's say I have these revisions: rev 1 introduces bug #1 rev 2 possibly introduces bug #2 rev 3 possibly introduces bug #2 rev 4 possibly introduces bug #2 rev 5 fixes bug #1 To verify where bug #2 occured, bug #1 needs to be fixed. Can the…
silverwind
  • 3,296
  • 29
  • 31
8
votes
1 answer

Is there a script that provides the equivalent to git-bisect for Perforce (p4)?

The git-bisect provides hooks to perform a binary search on revisions and figure out which change broke the design. Is there an equivalent script for Perforce? I did SO and Google searches with no luck. Update Mar 1 2010: As Douglas Leeder…
Brian Carlton
  • 7,545
  • 5
  • 38
  • 47
7
votes
0 answers

Make Git Bisect do a force checkout or otherwise overwrite local changes

I'm git bisecting a Unity3D repository and every time I open the Unity3D editor to check if the current revision is good or bad, Unity3D dirties a few files, forcing me to do a hard reset before continuing with the bisection. This is because if I…
AnLog
  • 796
  • 1
  • 7
  • 15
7
votes
1 answer

Is a more targeted recovery from git bisect mistakes possible?

I am aware that it is possible to fix a git bisect session via git bisect log and git bisect replay as described in the answers to this question. However, when I mess up a bisect session, that's likely just a single wrong decision, and I would like…
cmaster - reinstate monica
  • 38,891
  • 9
  • 62
  • 106
7
votes
1 answer

Similar trick to git bisect WITHIN a commit

With git bisect we can zoom in on when a problem might have been introduced between commits. I was wondering if there is also a way to have git go through (combinations) of files within a single commit, so you can figure out which file / part is…
PascalVKooten
  • 20,643
  • 17
  • 103
  • 160