Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase onto branch from a marked base commit #2835

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

stefanhaller
Copy link
Collaborator

@stefanhaller stefanhaller commented Jul 26, 2023

  • PR Description

Introduce a new command (shift-B by default) to mark the base commit for the next rebase. After that, invoking a rebase in the branches panel rebases from that base commit, effectively performing a git rebase --onto <selected-branch> <marked-base>.

Addresses #987.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go run scripts/cheatsheet/main.go generate)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@@ -307,6 +307,9 @@ func displayCommit(
color := lo.Ternary(commit.Action == models.ActionConflict, style.FgRed, style.FgYellow)
youAreHere := color.Sprintf("<-- %s ---", common.Tr.YouAreHere)
name = fmt.Sprintf("%s %s", youAreHere, name)
} else if isMarkedBaseCommit {
rebaseFromHere := style.FgYellow.Sprint(common.Tr.MarkedCommitMarker)
name = fmt.Sprintf("%s %s", rebaseFromHere, name)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marked the commit as "RFC" because this is not the most beautiful design. Suggestions for a better UI welcome; but I prefer this very explicit and in-your-face visualization over just coloring the sha.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to somehow darken the text of the commits from the marked commit down. Something like this (except for the background color, I'm not good with Photoshop 😅):
Untitled

Unfortunately I have no idea how to achieve that, suggestions welcome.

@stefanhaller stefanhaller force-pushed the rebase-onto-from-base branch 2 times, most recently from 7666b02 to 117a8eb Compare July 26, 2023 19:39
@jesseduffield
Copy link
Owner

Haven't looked at the code but I'd like your thoughts on a more general pattern where you have a single concept of a 'marked' commit and then you have different actions associated with marked commits. For example:

  • you can mark a commit in order to rebase from it
  • you mark one or more in order to cherry pick them
  • you can mark a commit in order to diff against it
  • you can mark several commits to perform a bulk operation on them e.g. drop them, move them

This concept could be extended to other views as well e.g. mark a bunch of files and then discard them (which would spare some keybindings if you can do a drag-selection like you can when staging lines with the 'v' key)

Some pros/cons of a unified approach:
Pros:

  • only one keybinding to remember for marking an item
  • easy to carry intuitions from one mark-oriented action to another

Cons:

  • if you need to do several things at once you won't be able to e.g. cherry pick while diffing, but I can't think of any such realistic examples
  • the UI of a marked commit will be consistent, but that also means it's less targeted (can't show a label specific to the operation to be performed)
  • you would need to have some error handling e.g. raise an error if the user has marked more than one commit but wants to 'rebase from marked commit'

I think the pros outweigh the cons.

This is not to say that we can't go with this PR's approach for now, given it'll take some time to do a unified marking UX. Keen to get your thoughts though.

@stefanhaller
Copy link
Collaborator Author

Yes, I have suggested this before (see last bullet point of this comment). However, I'm no longer so sure whether it's really a great idea.

  • marking a commit to diff against should really be a feature separate from the others. It would be very strange and confusing if you want to copy/paste commits, or mark commits for a bulk move, and the diff view starts to show funny diffs that make no sense while you move around.
  • some of the operations are across views (copy/paste), others only make sense within a single view (bulk move). I feel that especially for bulk operations we want a different UX than simply marking arbitrary sets of shas in arbitrary views (more on that below).
  • for rebase from marked commit, I'm not sure that implicitly using the marked commit if there is one isn't too error-prone, as you might still have a marked commit from the last copy/paste or bulk operation without realizing it. So this would probably need a separate "rebase from marked commit" command (which would have to show an error if there isn't one). The approach in this PR doesn't need that.
  • I really like the more targeted UI, especially for the "Rebase from here" marker that this PR adds.

Thoughts on bulk operations: My feeling is that this should not use a permanent marker like copy/paste does; instead, there should just be a way to extend the selection (highlight) to more than one line. For a contiguous range of lines this wouldn't be too hard; the canonical way to do that in other apps is shift-arrow. In my fork I have a commit that adds this for the staging panel, instead of the v range mode. This would very naturally extend to list views, I think. The only challenge then is how to support non-contiguous selections; in other apps this is done with command-clicking on Mac, or ctrl-clicking on Windows. I haven't looked into whether this would be possible with tcell. But even if we only supported contiguous selections for now, this would already be a huge improvement, especially for bulk-moving commits.

@jesseduffield
Copy link
Owner

I had a draft response for this but I lost it!

I agree with you that there are differences in the different use cases that could call for different UX flows. I also agree that we may not need to care about non-contiguous multi-selections (nothing comes to my mind where you would need it other than cherry picking but with cherry picking you could use the contiguous multi-select as a way to then add the commits to larger non-contiguous set before pasting them.

I'd like to think more about this and do some POCs but I'm happy to go with your PR's approach now regardless.

I'm yet to look at the code though

Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

When we show rebase menu we should tell the user that we're using the --onto arg. We could do this by having the second column of the menu show the command we're going to run in full, which should be simple enough by extracting out a GetRebaseCmdObj method and calling that then calling .ToString() on it. Or if that's too long to fit on one line we could include it in the tooltip.

As for the design, it's tricky because git itself makes things confusing by not including the base commit in the rebase which is not intuitive at all to me. Perhaps all the commits that will actually be rebased can be highlighted in some way. I'll spend some time playing with it locally.

It's also occurred to me after reading this stack overflow thread that the --onto arg can be used within a branch as a way to remove some commits. This is a contrived example, but makes me think we should try to get a keybinding that we can use for rebasing with any item that supports it (commits, branches, tags, remote branches, etc). Currently, the 'r' keyword is reserved for rewording a commit. I like the idea of having 'r' be used for rebase and 'R' being used for rewording (we already have 'R' for renaming branches). We'd need to put the reword-in-lazygit and reword-in-editor options behind a menu but it's only one extra keypress. Of course this PR doesn't need to do that, I'm just talking out loud.

@@ -156,6 +156,15 @@ func (self *RebaseCommands) EditRebase(branchRef string) error {
}).Run()
}

func (self *RebaseCommands) EditRebaseFromBaseCommit(targetBranchName string, baseCommit string) error {
self.os.LogCommand(fmt.Sprintf("Beginning interactive rebase from '%s' onto '%s", baseCommit, targetBranchName), false)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs i18n

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it? All the existing LogCommand calls I could find use literal strings.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow right you are. That's a huge oversight on my part. My rule has been that anything which the user can see within lazygit should be i18n'd. That means that logs that go to the log file (e.g. self.c.Log.Warnf(...)) don't need to i18n. But LogCommand and LogAction do.

Could you i18n this one and then I'll raise an issue for the rest?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: #2848

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll wait with this until after #2852 is merged, so that I know where to put the new text.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I changed my mind. 😄 Since this PR was otherwise ready, I decided to merge it now. @KarlHeitmann, can you please take care of this command too in your #2852 PR? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! I will fix it tonight.

err := self.c.Git().Rebase.RebaseBranch(ref)
return self.CheckMergeOrRebase(err)
baseCommit := self.c.Modes().MarkedBaseCommit.GetSha()
err := lo.Ternary(baseCommit != "",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 99% sure this isn't working the way you expect: lo.Ternary evaluates both the if and else expressions before picking which one to return (just cos that's how the language works and lo has no way to get around that). So this will unconditionally call both rebase functions.

I believe lo has lo.TernaryFunc which you can use to only evaluate the expression if it's chosen, but at that point I wonder if it's just easier to use an if/else statement.

lo.Ternary should really only be used when it's dealing expressions that evaluate without side effects and without much time/memory footprint.

In this case I'd use an opts object in RebaseBranch and let it internally deal with the baseCommit arg.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch; fixed in c2afab3. I wonder why it worked though, I had used this locally for a while, and the tests are green too.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beats me. Maybe by some weird quirk of git logic they're mutually idempotent? Or the first one runs to completion because it's evaluated first, and then the second one runs, fails with an error due to the state being different, and the error is ignored?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost. What happened: when baseCommit was non-empty, it first did the rebase --onto, then the normal rebase afterwards. The latter succeeded too, but was a no-op, because the branch was already sitting on its target. Conversely, when baseCommit was empty, the first command would fail, and then the second command would run and do its job. Phew.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, crazy!

@@ -234,17 +241,23 @@ func (self *MergeAndRebaseHelper) RebaseOntoRef(ref string) error {
Tooltip: self.c.Tr.InteractiveRebaseTooltip,
OnPress: func() error {
self.c.LogAction(self.c.Tr.Actions.RebaseBranch)
err := self.c.Git().Rebase.EditRebase(ref)
baseCommit := self.c.Modes().MarkedBaseCommit.GetSha()
err := lo.Ternary(baseCommit != "",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

return self.c.PushContext(self.c.Contexts().LocalCommits)
},
},
}

title := utils.ResolvePlaceholderString(
self.c.Tr.RebasingTitle,
lo.Ternary(self.c.Modes().MarkedBaseCommit.GetSha() != "",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an example where using ternary is harmless

@jesseduffield
Copy link
Owner

jesseduffield commented Jul 30, 2023

We could highlight the commits to be rebased like so:

image

Or even without highlighting the commit sha:
image

@jesseduffield
Copy link
Owner

Here's the patch for that btw:

diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go
index 575b27700..46ae93898 100644
--- a/pkg/gui/presentation/commits.go
+++ b/pkg/gui/presentation/commits.go
@@ -102,6 +102,7 @@ func GetCommitListDisplayStrings(
 
 	lines := make([][]string, 0, len(filteredCommits))
 	var bisectStatus BisectStatus
+	willBeRebased := markedBaseCommit == ""
 	for i, commit := range filteredCommits {
 		unfilteredIdx := i + startIdx
 		bisectStatus = getBisectStatus(unfilteredIdx, commit.Sha, bisectInfo, bisectBounds)
@@ -111,11 +112,15 @@ func GetCommitListDisplayStrings(
 			showYouAreHereLabel = false
 		}
 		isMarkedBaseCommit := commit.Sha != "" && commit.Sha == markedBaseCommit
+		if isMarkedBaseCommit {
+			willBeRebased = true
+		}
 		lines = append(lines, displayCommit(
 			common,
 			commit,
 			cherryPickedCommitShaSet,
 			isMarkedBaseCommit,
+			willBeRebased,
 			diffName,
 			timeFormat,
 			shortTimeFormat,
@@ -265,6 +270,7 @@ func displayCommit(
 	commit *models.Commit,
 	cherryPickedCommitShaSet *set.Set[string],
 	isMarkedBaseCommit bool,
+	willBeRebased bool,
 	diffName string,
 	timeFormat string,
 	shortTimeFormat string,
@@ -276,7 +282,7 @@ func displayCommit(
 	bisectInfo *git_commands.BisectInfo,
 	isYouAreHereCommit bool,
 ) []string {
-	shaColor := getShaColor(commit, diffName, cherryPickedCommitShaSet, isMarkedBaseCommit, bisectStatus, bisectInfo)
+	shaColor := getShaColor(commit, diffName, cherryPickedCommitShaSet, bisectStatus, bisectInfo)
 	bisectString := getBisectStatusText(bisectStatus, bisectInfo)
 
 	actionString := ""
@@ -310,6 +316,9 @@ func displayCommit(
 	} else if isMarkedBaseCommit {
 		rebaseFromHere := style.FgYellow.Sprint(common.Tr.MarkedCommitMarker)
 		name = fmt.Sprintf("%s %s", rebaseFromHere, name)
+	} else if !willBeRebased {
+		willBeRebased := style.FgYellow.Sprint("✓")
+		name = fmt.Sprintf("%s %s", willBeRebased, name)
 	}
 
 	authorFunc := authors.ShortAuthor
@@ -362,7 +371,6 @@ func getShaColor(
 	commit *models.Commit,
 	diffName string,
 	cherryPickedCommitShaSet *set.Set[string],
-	isMarkedBaseCommit bool,
 	bisectStatus BisectStatus,
 	bisectInfo *git_commands.BisectInfo,
 ) style.TextStyle {
@@ -386,12 +394,8 @@ func getShaColor(
 	default:
 	}
 
-	if isMarkedBaseCommit {
-		shaColor = theme.MarkedBaseCommitTextStyle
-	} else if diffed {
+	if diffed {
 		shaColor = theme.DiffTerminalColor
-	} else if cherryPickedCommitShaSet.Includes(commit.Sha) {
-		shaColor = theme.CherryPickedCommitTextStyle
 	}
 
 	return shaColor

@jesseduffield jesseduffield added the feature For large enhancements that add a new chunk of functionality label Jul 30, 2023
@stefanhaller
Copy link
Collaborator Author

When we show rebase menu we should tell the user that we're using the --onto arg. We could do this by having the second column of the menu show the command we're going to run in full,

The full command is way too long to show in the menu; it includes options like --autostash, --keep-empty, --no-autosquash, --rebase-merges, none of which are interesting to see in the menu.

Personally I also don't feel it's necessary to show the corresponding git command; if we have a good, intuitive visualization, it will be clear enough, or actually even clearer than the command line.

It's also occurred to me after reading this stack overflow thread that the --onto arg can be used within a branch as a way to remove some commits. This is a contrived example, but makes me think we should try to get a keybinding that we can use for rebasing with any item that supports it (commits, branches, tags, remote branches, etc). Currently, the 'r' keyword is reserved for rewording a commit. I like the idea of having 'r' be used for rebase and 'R' being used for rewording (we already have 'R' for renaming branches). We'd need to put the reword-in-lazygit and reword-in-editor options behind a menu but it's only one extra keypress. Of course this PR doesn't need to do that, I'm just talking out loud.

That would be #2206.

@stefanhaller
Copy link
Collaborator Author

Here's the patch for that btw:

Thanks, applied in fba9de8.

@jesseduffield
Copy link
Owner

The full command is way too long to show in the menu; it includes options like --autostash, --keep-empty, --no-autosquash, --rebase-merges, none of which are interesting to see in the menu.

Personally I also don't feel it's necessary to show the corresponding git command; if we have a good, intuitive visualization, it will be clear enough, or actually even clearer than the command line.

Ah, I actually missed that we were already saying Rebase 'rebase-onto-from-base' from marked base onto 'master' in the menu title. I'm happy with that: just so long as there's something to remind the user about the marked base.

In general though, as a design principle, I don't want to be obscuring the underlying git commands. We received a lot of feedback about lack of understanding about what commands were being run back before we introduced the command log, and since introducing it people have said it's one of the things they like most about lazygit. I actually want to move towards something like magit where you have complete control over what flags are used for each command, though I want to do it in a way where you only invoke that functionality when you want it, so that the typical flows are still efficient.

@jesseduffield
Copy link
Owner

One final thing: The Rebase from here label is imperative which I find confusing given that the other labels we have for similar situations are descriptive e.g. 'YOU ARE HERE'. How about 'Will rebase from here'?

@jesseduffield
Copy link
Owner

That would be #2206.

I've closed that due to staleness and raised an issue which captures the problem/solution: #2850 (keen to get your thoughts on my proposal btw)

@stefanhaller
Copy link
Collaborator Author

Here's the patch for that btw:

Thanks, applied in fba9de8.

I hadn't looked closely enough at the patch; it broke the coloring of cherry-picked commits. I don't think that was intentional, but I'm not sure how else it happened. I restored it in 4a0860c.

@stefanhaller
Copy link
Collaborator Author

One final thing: The Rebase from here label is imperative which I find confusing given that the other labels we have for similar situations are descriptive e.g. 'YOU ARE HERE'. How about 'Will rebase from here'?

Makes sense, changed in 305979e.

Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

We are in the outsideFilterModeBindings section here; all of these handlers are
wrapped in a OutsideFilterMode guard in a loop below. No need to add one
manually here.
This allows to do the equivalent of "git rebase --onto <target> <base>", by
first marking the <base> commit with the new command, and then selecting the
target branch and invoking the usual rebase command there.
@stefanhaller stefanhaller merged commit 71d2fd3 into master Jul 31, 2023
12 checks passed
@stefanhaller stefanhaller deleted the rebase-onto-from-base branch July 31, 2023 06:52
renovate bot added a commit to scottames/dots that referenced this pull request Aug 5, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[GoogleContainerTools/skaffold](https://github.com/GoogleContainerTools/skaffold)
| patch | `v2.6.2` -> `v2.6.3` |
| [ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide) | patch
| `v0.9.1` -> `v0.9.2` |
| [aquaproj/aqua-registry](https://github.com/aquaproj/aqua-registry)
| patch | `v4.32.0` -> `v4.32.2` |
| [jesseduffield/lazygit](https://github.com/jesseduffield/lazygit) |
minor | `v0.39.4` -> `v0.40.0` |
| [weaveworks/eksctl](https://github.com/weaveworks/eksctl) | minor |
`v0.150.0` -> `v0.151.0` |

---

### Release Notes

<details>
<summary>GoogleContainerTools/skaffold
(GoogleContainerTools/skaffold)</summary>

###
[`v2.6.3`](https://github.com/GoogleContainerTools/skaffold/releases/tag/v2.6.3):
Release

[Compare
Source](https://github.com/GoogleContainerTools/skaffold/compare/v2.6.2...v2.6.3)

##### v2.6.3 Release - 2023-08-04

**Linux amd64**
`curl -Lo skaffold
https://storage.googleapis.com/skaffold/releases/v2.6.3/skaffold-linux-amd64
&& chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**Linux arm64**
`curl -Lo skaffold
https://storage.googleapis.com/skaffold/releases/v2.6.3/skaffold-linux-arm64
&& chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**macOS amd64**
`curl -Lo skaffold
https://storage.googleapis.com/skaffold/releases/v2.6.3/skaffold-darwin-amd64
&& chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**macOS arm64**
`curl -Lo skaffold
https://storage.googleapis.com/skaffold/releases/v2.6.3/skaffold-darwin-arm64
&& chmod +x skaffold && sudo mv skaffold /usr/local/bin`

**Windows**

https://storage.googleapis.com/skaffold/releases/v2.6.3/skaffold-windows-amd64.exe

**Docker image**
`gcr.io/k8s-skaffold/skaffold:v2.6.3`

**Full Changelog**:
GoogleContainerTools/skaffold@v2.6.2...v2.6.3

</details>

<details>
<summary>ajeetdsouza/zoxide (ajeetdsouza/zoxide)</summary>

###
[`v0.9.2`](https://github.com/ajeetdsouza/zoxide/releases/tag/v0.9.2):
0.9.2

[Compare
Source](https://github.com/ajeetdsouza/zoxide/compare/v0.9.1...v0.9.2)

##### Added

-   Short option `-a` for `zoxide query --all`.

##### Fixed

-   PowerShell: use `global` scope for variables / functions.

</details>

<details>
<summary>aquaproj/aqua-registry (aquaproj/aqua-registry)</summary>

###
[`v4.32.2`](https://github.com/aquaproj/aqua-registry/releases/tag/v4.32.2)

[Compare
Source](https://github.com/aquaproj/aqua-registry/compare/v4.32.1...v4.32.2)


[Issues](https://github.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.32.2)
| [Pull
Requests](https://github.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.32.2)
| aquaproj/aqua-registry@v4.32.1...v4.32.2

##### Fixes


[#&#8203;14327](https://github.com/aquaproj/aqua-registry/issues/14327)
Rename kyleconroy/sqlc to sqlc-dev/sqlc as of repository migration
[@&#8203;ichizero](https://github.com/ichizero)

[#&#8203;14339](https://github.com/aquaproj/aqua-registry/issues/14339)
sqlc-dev/sqlc: Support old versions

###
[`v4.32.1`](https://github.com/aquaproj/aqua-registry/releases/tag/v4.32.1)

[Compare
Source](https://github.com/aquaproj/aqua-registry/compare/v4.32.0...v4.32.1)


[Issues](https://github.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.32.1)
| [Pull
Requests](https://github.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.32.1)
| aquaproj/aqua-registry@v4.32.0...v4.32.1

#### Fixes


[#&#8203;14275](https://github.com/aquaproj/aqua-registry/issues/14275)
[#&#8203;14276](https://github.com/aquaproj/aqua-registry/issues/14276)
[#&#8203;14277](https://github.com/aquaproj/aqua-registry/issues/14277)
[#&#8203;14278](https://github.com/aquaproj/aqua-registry/issues/14278)
[domoritz/arrow-tools/{csv2arrow,csv2parquet,json2arrow,json2parquet}](https://github.com/domoritz/arrow-tools):
Follow up changes of asset names

</details>

<details>
<summary>jesseduffield/lazygit (jesseduffield/lazygit)</summary>

###
[`v0.40.0`](https://github.com/jesseduffield/lazygit/releases/tag/v0.40.0)

[Compare
Source](https://github.com/jesseduffield/lazygit/compare/v0.39.4...v0.40.0)

<!-- Release notes generated using configuration in .github/release.yml
at v0.40.0 -->

### 🎉  LAZYGIT FIVE YEAR ANNIVERSARY EDITION 🎉

Holy moly, has it really been 5 years since Lazygit's birth? Time flies
when you're having fun.

I've written a post celebrating the anniversary
[here](https://jesseduffield.com/Lazygit-5-Years-On).

As for this release, we've got some great features here.

##### Worktrees

We now have a worktrees view so you can easily create worktrees and
switch to them and so on. I'm not a big worktrees user myself so please
raise an issue if you can think of places to improve the UX.


![worktree_create_from_branches-compressed](https://github.com/jesseduffield/lazygit/assets/8456633/3ef0b085-e9d0-42de-af58-16cbae581d34)

##### Rebase --onto

Rebasing onto a marked base commit is a very useful feature that we've
been sorely lacking for a while
(demo coming soon)

##### Auto-refresh on window focus

Auto-refresh on window activation is a complete game-changer. No more
having to manually press shift+R when you come back from your editor.

##### Nuking the worktree

We also have a fun enhancement in this release: showing an explosion
animation when you nuke the working tree.


![nuke-gif](https://github.com/jesseduffield/lazygit/assets/8456633/32b3f91c-fea3-474d-8997-1de2f5e4f5d4)

You'll also notice in the readme we've got some updated demo gifs to
showoff Lazygit's features. More of those to come.

#### What's Changed

##### Features ✨

- Add worktrees view by
[@&#8203;jesseduffield](https://github.com/jesseduffield) (with help
from [@&#8203;kadaan](https://github.com/kadaan)) in
[jesseduffield/lazygit#2147
- Rebase onto branch from a marked base commit by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2835
- Auto-refresh on window activation by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2854

##### Enhancements 🔥

- Faster refresh by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2841
- feat: add os.copyToClipboardCmd to allow for a custom command
[#&#8203;1055](https://github.com/jesseduffield/lazygit/issues/1055)
by [@&#8203;redstreet](https://github.com/redstreet) in
[jesseduffield/lazygit#2784
- Add bisect menu entry that lets you choose bisect terms by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2838
- When bisecting, always mark the current commit as good/bad, not the
selected by [@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2837
- Visualize local branch heads in commits panel, 2nd approach by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2775
- Allow force-tagging if tag exists by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2827
- Save IgnoreWhitespaceInDiffView in state.yml by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2830
- Show loader when rebasing by
[@&#8203;KarlHeitmann](https://github.com/KarlHeitmann) in
[jesseduffield/lazygit#2851
- Internationalise logging of commands by
[@&#8203;KarlHeitmann](https://github.com/KarlHeitmann) in
[jesseduffield/lazygit#2852
- Show visual explosion effect when nuking worktree by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2861

##### Fixes 🔧

- Fix issue where using `null` to un-map a keybinding was ignored by
[@&#8203;hatredholder](https://github.com/hatredholder) in
[jesseduffield/lazygit#2832
- Show error when trying to open patch menu with an empty patch by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2829
- Fix merge status for update-ref command by
[@&#8203;stefanhaller](https://github.com/stefanhaller) in
[jesseduffield/lazygit#2845
- Stop worktrees view from stealing the window by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2863
- Fix confirmation view sizing by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2879

##### Maintenance ⚙️

- Standardise on using lo for slice functions by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2846
- Remove redundant secureexec package by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2847
- Add automated demo recordings by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2853
- Remove file watcher code by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2865
- Add more demos to the README by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2866
- Move features to top of readme by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2867
- Add more demos by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2874

##### Other Changes

- Create demo output dir if it doesn't already exist by
[@&#8203;jesseduffield](https://github.com/jesseduffield) in
[jesseduffield/lazygit#2857

#### New Contributors

- [@&#8203;hatredholder](https://github.com/hatredholder) made their
first contribution in
[jesseduffield/lazygit#2832
- [@&#8203;redstreet](https://github.com/redstreet) made their first
contribution in
[jesseduffield/lazygit#2784
- [@&#8203;kadaan](https://github.com/kadaan) made their first
contribution in
[jesseduffield/lazygit#2147
- [@&#8203;KarlHeitmann](https://github.com/KarlHeitmann) made their
first contribution in
[jesseduffield/lazygit#2851

**Full Changelog**:
jesseduffield/lazygit@v0.39.4...v0.40.0

</details>

<details>
<summary>weaveworks/eksctl (weaveworks/eksctl)</summary>

###
[`v0.151.0`](https://github.com/eksctl-io/eksctl/releases/tag/v0.151.0):
eksctl 0.151.0 (permalink)

[Compare
Source](https://github.com/weaveworks/eksctl/compare/0.150.0...0.151.0)

### Release v0.151.0

#### 🚀 Features

- Support custom AMIs for self-managed Windows nodegroups
([#&#8203;6804](https://github.com/weaveworks/eksctl/issues/6804))
- Support custom Ubuntu AMIs for EKS-managed nodegroups
([#&#8203;6850](https://github.com/weaveworks/eksctl/issues/6850))

#### 🎯 Improvements

- Remove support for EKS 1.22
([#&#8203;6704](https://github.com/weaveworks/eksctl/issues/6704))

#### 🐛 Bug Fixes

- Fix error with tar in `Post Cache go-build and mod` step
([#&#8203;6840](https://github.com/weaveworks/eksctl/issues/6840))
- Fix setting link-time variables for release version
([#&#8203;6841](https://github.com/weaveworks/eksctl/issues/6841))
- Select one subnet for AZs where multiple are present and no VPC config
provided
([#&#8203;6814](https://github.com/weaveworks/eksctl/issues/6814))
- Paginate instance type offerings response
([#&#8203;6832](https://github.com/weaveworks/eksctl/issues/6832))

#### 🧰 Maintenance

- Bump dependencies
([#&#8203;6852](https://github.com/weaveworks/eksctl/issues/6852),
[#&#8203;6859](https://github.com/weaveworks/eksctl/issues/6859))
- Cleanup Flux Integration
([#&#8203;6836](https://github.com/weaveworks/eksctl/issues/6836))

#### Acknowledgments

Weaveworks would like to sincerely thank:
[@&#8203;watany-dev](https://github.com/watany-dev)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on thursday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/scottames/dots).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature For large enhancements that add a new chunk of functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants