Hacker News new | past | comments | ask | show | jobs | submit login

I resolve conflicts in GUI every week.

I find the location of a bug by running tests and looking at the code.




git bisect will optimize the number of tests you have to run, and will reduce the amount of code you have to look at it to the minimum (in general).


Assuming a binary search over version history is a valid way of finding the bug. If you have a better idea of the probability distribution (e.g. it might've started being buggy any time in the past year, but I'm fairly sure it happened about nine months ago when the formatting of the report broke a bit) you can do a better job manually than `git bisect` – and if the bug is actually multiple bugs, or other things changed that affected the bug's presence or absence (making it appear or disappear in non-trivial patterns between versions), `git bisect` will mislead you.

`git bisect` is pretty cool, but “knowing your tools” isn't the same thing as “memorising the man pages”.


if you are confident that it happened about nine months ago, then just start the bisect bounded by age-appropriate commits. just a case of knowing your tools ;)

yes, if the bug is a complex interaction of several different code changes, and comes and goes, then a binary search will not find it. however, it may be the fastest way to realize that it is this sort of bug. recognizing patterns in what happens when you use git bisect is another aspect of knowing your tools, and in this case, will help you move more rapidly toward a more appropriate approach.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: