summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/local_commits_controller.go
AgeCommit message (Collapse)Author
2023-04-18Don't allow resetting non-HEAD commits (including rebase todos) during rebaseStefan Haller
2023-04-15Don't allow changing the type of certain rebase todosStefan Haller
We already show "merge" todo entries when starting an interactive rebase with --rebase-merges outside of lazygit. Changing the type of a merge entry to "pick" or "edit" doesn't make sense and shouldn't be allowed. Earlier in this branch we have started to show "update-ref" entries, these can't be changed either (they can be moved, though). You might argue that it should be possible to change them to "drop", but in the case of "update-ref" this doesn't make sense either, because "drop" needs a Sha and we don't have one here. Also, you would then be able to later change it back to "pick", so we would have to remember that this isn't allowed for this particular drop entry; that's messy, so just disallow all editing.
2023-04-15Make moving todo commits more robustStefan Haller
2023-04-15Make EditRebaseTodo more robustStefan Haller
It used to work on the assumption that rebasing commits in lazygit's model correspond one-to-one to lines in the git-rebase-todo file, which isn't necessarily true (e.g. when users use "git rebase --edit-todo" at the custom command prompt and add a "break" between lines).
2023-04-15Store commit.Action as an enum instead of a stringStefan Haller
The main reason for doing this (besides the reasons given for Status in the previous commit) is that it allows us to easily convert from TodoCommand to Action and back. This will be needed later in the branch. Fortunately, TodoCommand is one-based, so this allows us to add an ActionNone constant with the value 0.
2023-04-01Better error message when trying to amend a commit other than head during rebaseStefan Haller
2023-04-01Allow amending the head commit during interactive rebaseLuka Markušić
2023-04-01Better error message when trying to edit or move a non-todo commit during rebaseStefan Haller
Previously we would have tried to do the rebase, resulting in a long and somewhat cryptic error message from git; now we check ourselves and show a less intimidating message.
2023-04-01Allow rewording the head commit during interactive rebaseStefan Haller
2023-04-01Cleanup: use commit.isTODO() consistentlyStefan Haller
It seems cleaner than checking the Status for "rebasing".
2023-02-22migrate interactive rebase integration testsJesse Duffield
2023-02-20Merge pull request #2453 from stefanhaller/allow-rebasing-to-first-commitJesse Duffield
2023-02-20add create tag from commit testJesse Duffield
2023-02-20Allow squashing fixups above the first commit of a repoStefan Haller
This includes amending changes into a given commit, since that's implemented in terms of the former.
2023-02-20Better error message for trying to squash or fixup the first commitStefan Haller
It's not so much the total number of commits that matters here, it's just whether we are on the first one. (This includes the other condition.) This allows us to get rid of the condition in rebase.go.
2023-02-19Edit by breaking after current commitStefan Haller
Instead of rebasing from the commit below the current one and then setting the current one to "edit", we rebase from the current one and insert a "break" after it. In most cases the behavior is exactly the same as before, except that the new method also works if the current commit is a merge commit. This is useful if you want to create a new commit at the very beginning of your branch (by editing the last commit before your branch).
2023-01-26Add user config gui.skipRewordInEditorWarningstk
2023-01-22Extract helper function doRewordEditorstk
No behavior change, just a preparation for the next commit.
2022-07-30Fix rewording a merge commit with editorLuka Markušić
2022-06-09support setting the author of a commitJesse Duffield
update copy
2022-05-08rename displayString to label for menu itemsJesse Duffield
2022-05-08Add command to reset the commit author from the commits panel.Jens Pfeifle
2022-03-30pkg/gui: Rename IPopupHandler::Ask() to Confirm()Moritz Haase
Follow the JavaScript naming scheme for user interaction (alert, prompt, confirm) as discussed in #1832.
2022-03-27allow amending and reverting commits when filtering by fileJesse Duffield
2022-03-26show namesake for child viewsJesse Duffield
2022-03-26add basic commits controller for handling actions that apply to all commit ↵Jesse Duffield
contexts
2022-03-26Add copy commit attributes optionLuka Markušić
2022-03-23safe rewordJesse Duffield
2022-03-19use generics to DRY up context codeJesse Duffield
2022-03-17fix click handlingJesse Duffield
2022-03-17fix integration testsJesse Duffield
2022-03-17rename handlersJesse Duffield
2022-03-17add commit files controllerJesse Duffield
2022-03-17add common commit controllerJesse Duffield
2022-03-17cleanupJesse Duffield
2022-03-17more consistent namingJesse Duffield
2022-03-17refactor controllersJesse Duffield
2022-03-17controller for viewing sub commitsJesse Duffield
2022-03-17refactor contextsJesse Duffield
2022-03-17more refactoringJesse Duffield
2022-03-17refactor keybindingsJesse Duffield
2022-03-17no more indirectionJesse Duffield
2022-03-17resetting controllers on new repoJesse Duffield
2022-03-17some more refactoringJesse Duffield
2022-03-17move commit files context into new structureJesse Duffield
2022-03-17standardise namingJesse Duffield
2022-03-17add actions abstractionJesse Duffield
2022-03-17refactor contexts codeJesse Duffield
2022-03-17fix some thingsJesse Duffield
2022-03-17start moving commit panel handlers into controllerJesse Duffield
more and more move rebase commit refreshing into existing abstraction and more and more WIP and more handling clicks properly fix merge conflicts update cheatsheet lots more preparation to start moving things into controllers WIP better typing expand on remotes controller moving more code into controllers