1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
Commit Graph

4069 Commits

Author SHA1 Message Date
Jesse Duffield
8edad826ca Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the
gui package purely for the sake of better encapsulation
2023-04-30 13:19:52 +10:00
Jesse Duffield
826128a8e0
Merge pull request #2578 from jesseduffield/enforce-lowercase-filenames 2023-04-29 13:08:06 +10:00
Jesse Duffield
aec46942a8 enforce lowercase filenames 2023-04-29 13:05:05 +10:00
Jesse Duffield
aa70723e3a
Merge pull request #2558 from stefanhaller/allow-resetting-author-during-rebase 2023-04-29 12:44:14 +10:00
Jesse Duffield
7db54a948a
Merge pull request #2548 from AKARSHITJOSHI/fix/tagPush 2023-04-29 12:43:55 +10:00
README-bot
32556480da Updated README.md 2023-04-29 02:39:27 +00:00
Jesse Duffield
2553015029
Merge pull request #2577 from jbrains/add-editor-preset-for-kakoune 2023-04-29 12:39:10 +10:00
J. B. Rainsberger
6c010a788c
Add an editor preset for kakoune (kakoune.org). 2023-04-27 13:41:54 -03:00
Jesse Duffield
b17c38befd
Merge pull request #2567 from jesseduffield/bump-clipboard-package 2023-04-24 13:42:18 +10:00
Jesse Duffield
79dc1d9052
Merge pull request #2557 from noahziheng/feature/add-gitea-pr 2023-04-24 13:42:05 +10:00
README-bot
28d2b1432b Updated README.md 2023-04-24 03:37:27 +00:00
Jesse Duffield
ed98e11fa0
Merge pull request #2555 from Ryooooooga/revert-force-if-includes 2023-04-24 13:37:14 +10:00
Andre Mueller
07a22e69e7 bump clipboard package for WSL support 2023-04-24 13:33:27 +10:00
Noah Gao
bf3dd79b7a feat: add gitea to hosting service 2023-04-18 16:16:09 +00:00
Stefan Haller
21072226d2 Don't allow resetting non-HEAD commits (including rebase todos) during rebase 2023-04-18 17:34:07 +02:00
Stefan Haller
b09000194a Allow resetting author of HEAD commit during rebase 2023-04-18 17:33:33 +02:00
Ryooooooga
3546ab8f21
Revert "feat: support for push --force-if-includes"
This reverts commit e00f248cf7.
2023-04-17 19:37:33 +09:00
Personal
9a13447b97 Change push tag command
Signed-off-by: AKARSHITJOSHI <akarshitjoshi@gmail.com>
2023-04-16 10:37:11 +05:30
Jesse Duffield
1efb565b22
Merge pull request #2370 from AzraelSec/rebase-with-todo-edit 2023-04-15 19:17:06 +10:00
AzraelSec
08a445eb9d test: check focus on commits after performing an advanced rebase 2023-04-15 11:01:55 +02:00
AzraelSec
28501fbf77 chore: add focus on local commits after interactively rebase 2023-04-15 10:42:36 +02:00
Jesse Duffield
8f1f712841 use lowercase text for menu items (as we're still yet to standardise on 'Sentence case') 2023-04-15 17:29:31 +10:00
AzraelSec
b82b6a2992 test: add integration test to verify the interactive rebase correctly work 2023-04-15 17:26:08 +10:00
AzraelSec
ddcd6be245 refactor: introduce a struct to pack the
`PrepareInteractiveRebaseCommand` function
2023-04-15 17:26:08 +10:00
Jesse Duffield
711be78811 extract out function 2023-04-15 17:26:08 +10:00
AzraelSec
3422b1e218 test: update the UI to follow the new rebase type selection instead of confirm the previous popup 2023-04-15 17:26:08 +10:00
AzraelSec
a3fdf91714 feat: allow to perform a rebase with breaking before the first commit 2023-04-15 17:26:08 +10:00
AzraelSec
368f9c8cb3 feat: let interactive rebase prepend commands to the default todo file 2023-04-15 17:26:08 +10:00
README-bot
e18b4a4cc3 Updated README.md 2023-04-15 07:16:26 +00:00
Jesse Duffield
46718e25ca
Merge pull request #2547 from stefanhaller/more-robust-todo-rewriting 2023-04-15 17:16:11 +10:00
Stefan Haller
d675eb6507 Don't allow changing the type of certain rebase todos
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-15 08:36:03 +02:00
Stefan Haller
dc4e88f8a4 Make moving todo commits more robust 2023-04-15 08:36:03 +02:00
Stefan Haller
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
Stefan Haller
860a8d102b Add integration test for dropping a todo commit when there's an update-ref
The test shows how we are accidentally dropping the wrong commit in this case.
We'll fix that in the next commit.
2023-04-15 08:36:03 +02:00
Stefan Haller
a304fed68c Add GitVersion field to NewIntegrationTestArgs
It can be used to specify which git versions a given test should or should not run on.
2023-04-15 08:36:03 +02:00
Stefan Haller
227b0b781c Show update-ref commands in rebase todo list
This is useful when working with stacked branches, because you can now move
"pick" entries across an update-ref command and you can tell exactly which
branch the commit will end up in.

It's also useful to spot situations where the --update-refs option didn't work
as desired. For example, if you duplicate a branch and want to rebase only one
of the branches but not the other (maybe for testing); if you have
rebase.updateRefs=true in your git config, then rebasing one branch will move
the other branch along. To solve this we'll have to introduce a way to delete
the update-ref entry (maybe by hitting backspace?); this is out of scope for
this PR, so for now users will have to type "git rebase --edit-todo" into the
custom command prompt to sort this out.

We will also have to prevent users from trying to turn update-ref commands into
other commands like "pick" or "drop"; we'll do this later in this branch.
2023-04-15 08:36:03 +02:00
Stefan Haller
740474c10c Visualize branch heads in commits panel
Useful when working with stacked branches.
2023-04-15 08:36:03 +02:00
Stefan Haller
a0d179b6dc Make getHydratedRebasingCommits more robust
So far the algorithm worked on the assumption that the output of the "git show"
command corresponds one-to-one to the lines of the rebase-todo file. This
assumption doesn't hold once we start to include todo lines that don't have a
sha (like update-ref), or when the todo file contains multiple entries for the
same sha. This should never happen normally, but it can if users manually edit
the todo file and duplicate a line.
2023-04-15 08:36:03 +02:00
Stefan Haller
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
Stefan Haller
188773511e Store commit.Status as an enum instead of a string
This is unrelated to the changes in this PR, but since we are doing the same
thing for the commit.Action field in the next commit, it makes sense to do it
for Status too for consistency. Modelling this as an enum feels more natural
than modelling it as a string, since there's a finite set of possible values.
And it saves a little bit of memory (not very much, since none of the strings
were heap-allocated, but still).
2023-04-15 08:36:03 +02:00
Stefan Haller
62c5c32fbb Bump github.com/fsmiamoto/git-todo-parser to latest main version 2023-04-15 08:36:03 +02:00
Jesse Duffield
981ba4c66c
Merge pull request #2550 from jesseduffield/handle-flakey-tests 2023-04-14 21:15:22 +10:00
Jesse Duffield
7f5465a27b fix flaky tests 2023-04-14 21:01:45 +10:00
Jesse Duffield
275ed12486
Merge pull request #2545 from stefanhaller/fix-integration-test-name 2023-04-14 20:29:20 +10:00
Stefan Haller
6a340ec840 Reorder tests 2023-04-13 19:17:08 +02:00
Stefan Haller
3535cd0f94 Rename test files to match test names 2023-04-13 19:17:08 +02:00
Stefan Haller
b1a56249f5 Add CI job to check that the test list is up to date 2023-04-13 19:17:08 +02:00
Jesse Duffield
82c54ed3d2
Merge pull request #2544 from scallaway/git-diff-detect-renames 2023-04-13 21:47:59 +10:00
Jesse Duffield
bd62b519de
Merge pull request #2496 from jesseduffield/feature/prevent-history-custom-command 2023-04-13 21:25:35 +10:00
Jesse Duffield
04e0a9bb45
Merge pull request #2523 from stefanhaller/editor-config 2023-04-13 21:22:17 +10:00