1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-11 12:48:10 +03:00
Commit Graph

78 Commits

Author SHA1 Message Date
5645a662de Use --rebase-merges for interactive rebase
At the moment it doesn't make a big difference, because the vast majority of
callers create a list of todos themselves to completely replace what git came up
with. We're changing this in the following commits though, and then it's helpful
to preserve merges.
2023-04-29 07:28:33 +02:00
b09000194a Allow resetting author of HEAD commit during rebase 2023-04-18 17:33:33 +02:00
ddcd6be245 refactor: introduce a struct to pack the
`PrepareInteractiveRebaseCommand` function
2023-04-15 17:26:08 +10:00
a3fdf91714 feat: allow to perform a rebase with breaking before the first commit 2023-04-15 17:26:08 +10:00
368f9c8cb3 feat: let interactive rebase prepend commands to the default todo file 2023-04-15 17:26:08 +10:00
dc4e88f8a4 Make moving todo commits more robust 2023-04-15 08:36:03 +02:00
120dd1530a Make EditRebaseTodo more robust
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-15 08:36:03 +02:00
c53c5e47ef Store commit.Action as an enum instead of a string
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-15 08:36:03 +02:00
b24955063c Allow rewording the head commit during interactive rebase 2023-04-01 08:16:15 +02:00
4b4dccfd7d Fix "move patch into new commit" for partial hunk (#2507) 2023-03-18 18:17:47 +11:00
78f3a7a478 migrate interactive rebase integration tests 2023-02-22 19:36:31 +11:00
c5cd217a65 Allow squashing fixups above the first commit of a repo
This includes amending changes into a given commit, since that's implemented in
terms of the former.
2023-02-20 08:29:43 +01:00
a349e886ce Allow interactive rebasing all the way down to the first commit
Pass --root instead of a sha when we want to rebase down to the initial commit.
2023-02-20 07:40:05 +01:00
dd61c49a15 Better error message for trying to squash or fixup the first commit
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-20 07:40:04 +01:00
67b8ef449c Edit by breaking after current commit
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-02-19 10:21:01 +01:00
stk
1da762c295 Explicitly pass --no-autosquash when rebasing
This fixes the problem shown in the previous commit.
2023-02-09 18:21:11 +01:00
bc7873144e Override GIT_SEQUENCE_EDITOR for rebase commands
I noticed that `$GIT_SEQUENCE_EDITOR` is overridden in `PrepareInteractiveRebaseCommand`
but not in `runSkipEditorCommand`.

Before this change, some commands such as `SquashAllAboveFixupCommits`
would not work when a different sequence editor, e.g.
[git-interactive-rebase-tool](https://github.com/MitMaro/git-interactive-rebase-tool)
is configured.
2023-01-01 04:37:19 +01:00
41f86f6535 Rebase merges by default 2022-09-24 23:37:17 +02:00
b8900baf1a remove deprecated calls 2022-09-17 15:10:41 -07:00
86ac309e08 add build info when building from source 2022-08-01 20:16:50 +10:00
9591cc381a support setting the author of a commit
update copy
2022-06-09 19:12:20 +10:00
7c573a5bea Add command to reset the commit author from the commits panel. 2022-05-08 13:29:56 +10:00
cd5b041b0f clearer separation of concerns when bootstrapping application 2022-05-07 16:02:04 +10:00
43d3f2bcb6 refactor todo file generation 2022-03-24 20:14:41 +11:00
a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
3e80a9e886 refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
0dfd02c42d allow rewording old commits 2022-01-09 14:14:47 +11:00
c9a0cc6b30 refactor 2022-01-09 14:09:53 +11:00