-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add Squash merge #3566
base: master
Are you sure you want to change the base?
Add Squash merge #3566
Conversation
fix typo fix checkout branch
add langage and menu pannel
fix: type and rename files add refresh remove current branch in squashFiles tooltip
Hello, I finished the feature, and it seems to work well, I will add tests in futures days, but I would like your feedback already if you feel it's needed. The only problem is to generate the cheatsheet, they seem to be empty for the squash, but I don't find where the generate takes them from. It's my first PR, hope it's good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello 👋🏻 I left a couple of comments on your PR to discuss while you write the tests.
if checkedOutBranchName == refName { | ||
return func() error { return errors.New(self.c.Tr.CantMergeBranchIntoItself) } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What Stefan suggested in the original PR was to use the DisableReason
field exposed by the MenuItem
type to inhibit the actions instead of throwing an error when they're invoked.
Do to this, you should move this check to the upper level (the SquashBranch
function) and conditionally set the DisabledReason
field in case checkedOutBranchName == refName
. Also, consider that both those menu options are disabled for the same reason.
Co-authored-by: Federico <me@azraelsec.sh>
Hello,
This PR add merge --squash. A PR already exist #3130, but the author abandoned it, so I remake it.
I modified to fit most of the comment made except this one https://github.com/jesseduffield/lazygit/pull/3130/files#r1404808121. I didn't find an existing example and thus didn't know to modify the code to fit it to the new way of doing things.
There's still the choice box to commit or not to do as discussed #3130 (comment). I'll do it when I have time, I first need to read the code to see how it really works.
Also only english has been made for now.
go generate ./...
)docs/Config.md
) have been updated if necessary