-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Is your feature request related to a problem? Please describe.
when rewriting history as part of cleanup, i want to be able to checkout commits from older-to-newer to check if all commits are buildable.
currently in lazygit (v0.52.0), this requires following steps:
- go to
4-commits tab - navigate to the commit say, with arrow keys.
<SPC>(space) to checkout the commit (detached-head)- ... outside the lazygit: do the build and confirm it's buildable / working etc.
- a. go to
3-branches tab,
b. highlight base branch (attached-head 😆),
c.<SPC>checkout.
d. when going to4-commits tab, this step causes the cursor to start from the first commit. - repeat from step 1. for as many commits you want to verify
the proposal aims to ease the redundancy of steps 5a-d, 1, 2 in above flow.
Describe the solution you'd like
just like we are able to view commits one-by-one in lazygit commits tab, it would be nice to be able to checkout them one-by-one too.
this is what i meant by "sequential checkout" or "commit-wise review"
- this mode is enabled in
4-commits tab by some trigger on the intended commit to be checked out.
say<SPC>with some modifier to keep similarity with normal checkout. - a. in lazygit, all the newer commits are grayed out. this is very similar in theory to how the "Pending rebase todos" and "Commits" are separated while rebasing.
b. should moving cursor to them be disabled too? - a. press
<ESC>escape to exit this mode.
b. this will checkout the base branch. step 5 and 1 solved from the problem
c. but the cursor will stay on the same highlighted commit. efforts in step 2 minimized from the problem - navigate to some other commit, and repeat.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
i read that lazygit has review pr feature. maybe that provides a similar feature?
i have never been in position to review other people's pr locally, so, i have never seen this feature in action.
Additional context
$ lazygit --version | sed -n -e 's/, /\n/g' -e 's/=/: /gp;' | nu --stdin --commands 'from yaml'
╭──────────────┬────────╮
│ commit │ │
│ build date │ │
│ build source │ nix │
│ version │ 0.52.0 │
│ os │ linux │
│ arch │ amd64 │
│ git version │ 2.49.0 │
╰──────────────┴────────╯