Repository navigation
|
Can you actually use The SituationSo I ran into this hilarious little trap today while hunting down a pesky bug. You know how it goes: you're trying to do a clean Picture this classic mess:
Turns out, those bisect keybindings are apparently hiding exclusively in the main Commits panel of your active branch. Trying to do it from another branch's view is like trying to text someone on a calculator—it just doesn't speak the language. My Sad Workarounds 🛠️Right now, my choices are basically to Manually scrolling through a 500-commit The QuestionOkay so well m I completely blind and missing some secret ninja shortcut for this, or is bisect just permanently chained to the main Commits panel? Help a fellow developer out before I scroll my mouse wheel straight off my desk! |
Replies: 3 comments
|
Probably you've hit on a current limitation in LazyGit. As of right now, bisect actions (like marking a commit as good or bad with LazyGit's Best Workarounds for NowUntil a maintainer adds cross-branch bisect support or a PR is opened for it, you have a couple of clean ways to handle this inside LazyGit without necessarily dropping to an external terminal: |
|
You can add this with a custom command in customCommands:
- key: 'b'
context: 'subCommits'
description: 'Mark selected commit for bisect'
prompts:
- type: 'menu'
title: 'Mark {{.SelectedCommit.Hash}}'
key: 'Mark'
options:
- name: 'good'
value: 'good'
- name: 'bad'
value: 'bad'
command: 'git bisect {{.Form.Mark}} {{.SelectedCommit.Hash}}'
output: 'popup'
outputTitle: 'Git bisect'Append that entry to your existing If the branches have diverged, Git may first ask you to test their merge base. Test that revision too rather than assuming it is good. I put a complete example with a disposable, diverged repository here. Terminal validation on released LazyGit 0.66.2 recorded the selected staging hash in |
|
#6168 adds the |
Probably you've hit on a current limitation in LazyGit. As of right now, bisect actions (like marking a commit as good or bad with
b) are indeed strictly scoped to the main Commits panel of your currently checked-out branch. When you open another branch's commit log from the Branches panel, those bisect keybindings are inactive.LazyGit's
git bisectwrapper is designed around the assumption that you are stepping through the active working tree's history. Because bisecting physically moves yourHEADand checks out commits as you go, running it across arbitrary, non-checked-out branch logs outside the primary panel isn't wired up yet.Best Workarounds for Now
Until a maintainer adds cross-b…