Skip to content

Add undo_last_commit command #769

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

Merged
merged 5 commits into from
Jun 7, 2021

Conversation

remique
Copy link
Contributor

@remique remique commented Jun 4, 2021

Hey again! I started working on #758 but since it’s not finished yet, I am opening Draft Pull Request. It works, but it’s not finished. Am I going in the right direction with this?

  • It does not refresh main tab yet (sometimes). You have to switch between tabs to see the change
  • Should there be a popup or some kind of feedback?
  • Should undo_last_commit() in utils.rs be more general function, for future use?

@extrawurst
Copy link
Collaborator

@remique welcome back!🥳

It does not refresh main tab yet (sometimes). You have to switch between tabs to see the change

you need to send a explicit update request into the queue (check other such functions)

Should there be a popup or some kind of feedback?

only for the error case, see try_or_popup for examples.

Should undo_last_commit() in utils.rs be more general function, for future use?

not sure what you mean?

@remique
Copy link
Contributor Author

remique commented Jun 6, 2021

Unittests can probably be done better? Also, while working on this issue I have noticed that there are some commands with my keybinding (u) already assigned. To avoid potential conflicts, I changed undo_commit to SHIFT-U both in default and vim-keybindings (feel like it’s a bit more natural since it’s not the most used command in the world). Hopefully I didn’t forget about anything.

not sure what you mean?

Yeah me neither, nevermind 😄

@remique remique marked this pull request as ready for review June 6, 2021 14:24
@extrawurst
Copy link
Collaborator

good work @remique - almost there 👍

@remique
Copy link
Contributor Author

remique commented Jun 7, 2021

Okay, so this definitely feels more natural of a test. Thank you so much for the help and hopefully everything is ready for the merge now.

@extrawurst extrawurst merged commit b2b5a0f into gitui-org:master Jun 7, 2021
@extrawurst
Copy link
Collaborator

@remique thanks ❤️

@extrawurst extrawurst linked an issue Jun 7, 2021 that may be closed by this pull request
@remique remique deleted the dev/undo_last_commit branch June 7, 2021 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support "undo last commit"
2 participants