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

1716 Commits

Author SHA1 Message Date
Stefan Haller
08d679c3a8 Remove line number support for "open" command
The "open" command is supposed to behave in the same way as double-clicking a
file in the Finder/Explorer. The concept of jumping to a specific line in the
file doesn't make sense for this; use "edit" instead.
2023-04-13 13:14:00 +02:00
Stefan Haller
659d668e16 Implement edit presets 2023-04-13 13:14:00 +02:00
Jesse Duffield
a02b54e1b7
Merge pull request #2497 from stefanhaller/fix-initial-scroll-bar-size 2023-04-02 16:38:07 +10:00
Stefan Haller
d508badd62 Better error message when trying to amend a commit other than head during rebase 2023-04-01 08:16:15 +02:00
Luka Markušić
e7d0116312 Allow amending the head commit during interactive rebase 2023-04-01 08:16:15 +02:00
Stefan Haller
85fdb700ba Extract amendHead function into new AmendHelper 2023-04-01 08:16:15 +02:00
Stefan Haller
c757063264 Better error message when trying to edit or move a non-todo commit during rebase
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-01 08:16:15 +02:00
Stefan Haller
b24955063c Allow rewording the head commit during interactive rebase 2023-04-01 08:16:15 +02:00
Stefan Haller
c6930e0538 Cleanup: use commit.isTODO() consistently
It seems cleaner than checking the Status for "rebasing".
2023-04-01 08:16:15 +02:00
Jesse Duffield
213ae8dd07 fix reflog text colour by defaulting every view to the same foreground colour 2023-03-26 15:24:09 +11:00
Jesse Duffield
4780953cef
Merge pull request #2377 from shinhs0506/clear-staging-after-commit 2023-03-24 19:13:00 +11:00
Jesse Duffield
8121a0cc74 remove old integration test recording code 2023-03-24 18:42:11 +11:00
Stefan Haller
4adca84d68 Make sure scrollbars have the right size initially
We refresh the view after reading just enough to fill it, so that we see the
initial content as quickly as possible, but then we continue reading enough
lines so that we can tell how long the scrollbar needs to be, and then we
refresh again. This can result in slight flicker of the scrollbar when it is
first drawn with a bigger size and then jumps to a smaller size; however, that's
a good tradeoff for a solution that provides both good speed and accuracy.
2023-03-21 18:26:18 +01:00
Stefan Haller
b7c61aa883 Push initial context instead of just putting it in the context array
This makes sure activateContext gets called on it.
2023-03-20 20:14:13 +11:00
Stefan Haller
40f6767cfc Avoid deactivating and activating when pushing the current context again
When calling PushContext, do nothing if the context to be pushed is already on
top of the stack. Avoids flicker in certain situations.
2023-03-20 20:14:13 +11:00
John Shin
776d8f4d2e refresh the staging panel on successful commit
apply formatting
2023-03-20 20:13:59 +11:00
Jesse Duffield
4b67a45a16
Merge pull request #2515 from stefanhaller/fix-deprecated-rand-seed 2023-03-20 20:12:25 +11:00
Jesse Duffield
a82d952f48
Merge pull request #2495 from jesseduffield/feature/remove-altreturn 2023-03-20 20:11:35 +11:00
Stefan Haller
549ce09f71 Fix deprecated rand.Seed 2023-03-19 10:00:19 +01:00
Jesse Duffield
60f902f026 rename patch manager to patch builder 2023-03-19 16:35:57 +11:00
Jesse Duffield
73c7dc9c5d refactor patch code 2023-03-19 16:30:39 +11:00
Jesse Duffield
e6274af015
appease golangci-lint (#2512) 2023-03-19 11:20:29 +11:00
Jens Kutilek
5c8bc790ff
Make arrows consistent (#2501) 2023-03-18 11:32:44 +11:00
yk-kd
b5d612e6d6
Add border config (#2344)
Co-authored-by: yk-kd <yosuke.komada@gmail.com>
2023-03-18 11:23:31 +11:00
Luka Markušić
f314cb3763 Remove alternative confirmation and return keymappings 2023-03-09 10:32:00 +01:00
Stefan Haller
4bd1322941 Rename WillBeAppliedReverse to Reverse
This is the only "reverse"-related option that is left, so use a less clumsy
name for it.
2023-03-07 13:40:07 +01:00
Stefan Haller
45cf993982 Remove the PatchOptions.Reverse option
All callers pass false now (except for the tests, which we simply remove), so we
don't need the option any more.
2023-03-07 13:39:45 +01:00
Stefan Haller
e4659145e8 Use WillBeAppliedReverse (and git apply --reverse) in the staging panel too
It's simpler to have only one way of reversing a patch.
2023-03-07 13:38:19 +01:00
Stefan Haller
6bd1c1d068 Remove parameters that are no longer needed
All callers in this file now use reverseOnGenerate=false and
keepOriginalHeader=true, so hard-code that in the call to ModifiedPatchForLines
and get rid of the parameters.
2023-03-07 09:49:34 +01:00
Stefan Haller
9cc33c479b Use forward patches and --reverse flag for partial patches too
There's no reason to have two different ways of applying patches for whole-file
patches and partial patches; use --reverse for both. Not only does this simplify
the code a bit, but it fixes an actual problem: when reverseOnGenerate and
keepOriginalHeader are both true, the generated patch header is broken (the two
blobs in the line `index 6d1959b..6dc5f84 100644` are swapped). Git fails to do
a proper three-way merge in that case, as it expects the first of the two blobs
to be the common ancestor.

It would be possible to fix this by extending ModifiedPatchForLines to swap the
two blobs in this case; but this would prevent us from concatenating all patches
and apply them in one go, which we are going to do later in the branch.
2023-03-07 09:49:34 +01:00
Stefan Haller
f76cc27956 Bundle the reverse and keepOriginalHeader flags into a PatchOptions struct
We are going to add one more flag in the next commit.

Note that we are not using the struct inside patch_manager.go; we keep passing
the individual flags there. The reason for this will become more obvious later
in this branch.
2023-03-07 09:49:34 +01:00
Jesse Duffield
c36333af3d
Merge pull request #2433 from Ryooooooga/subcommits-limit 2023-03-06 18:22:57 +11:00
Stefan Haller
723504a290 Keep side context in context stack when pushing a main context
This fixes accordion mode for the commit files panel. When entering a file, the
commit files panel should stay expanded.
2023-03-04 15:07:48 +01:00
Stefan Haller
de3e4838ad Store WorkingTreeState in model
This is the working tree state at the time the model commits were loaded. This
avoids a visual glitch with the "You Are Here" label appearing at times when it
is not supposed to.
2023-03-01 09:12:00 +01:00
Stefan Haller
6af8f278d0 Don't put "<--- YOU ARE HERE" in the commit model's name
Instead, derive it from context at display time (if we're rebasing, it's the
first non-todo commit). This fixes the problem that unfolding the current
commit's files in the local commits panel would show junk in the frame's title.

Along the way we make sure to only display the "<--- YOU ARE HERE" string in the
local commits panel; previously it would show for the top commit of a branch or
tag if mid-rebase.
2023-03-01 09:12:00 +01:00
Jesse Duffield
af7c71d1ee
Merge pull request #2476 from pereBohigas/feature/add_kotlin_icon 2023-02-28 10:11:47 +11:00
Ryooooooga
a624e0457f
feat(subcommits): load unlimited sub-commits 2023-02-27 15:29:00 +09:00
Pere Bohigas
adef3bd4ca Add icon for Kotlin script files 2023-02-25 15:14:26 +01:00
Jesse Duffield
dd1bf629b8 migrate patch building tests 2023-02-25 21:37:16 +11:00
Pere Bohigas
c80a94aa7a Add icon for Kotlin files 2023-02-25 10:51:43 +01:00
Jesse Duffield
037e957282 fix PullMergeConflict integration test 2023-02-25 11:39:24 +11:00
Jesse Duffield
db011d8e34 Improve staging panel integration tests 2023-02-25 11:35:41 +11:00
Jesse Duffield
78f3a7a478 migrate interactive rebase integration tests 2023-02-22 19:36:31 +11:00
Jesse Duffield
56424eb1aa remove x keybinding for opening menu so we now only use '?' 2023-02-20 19:28:45 +11:00
Jesse Duffield
38c7030b0f mention path in tooltips 2023-02-20 19:28:45 +11:00
Luka Markušić
31b8524fe6 Add tooltips for discarding 2023-02-20 19:28:45 +11:00
Luka Markušić
0ae34aeeb7 Make discarding items less error prone
The menu is opened by `d` so this makes it harder to mess things up by
accidentally pressing `dd`.
2023-02-20 19:28:45 +11:00
Jesse Duffield
e1c376ef54
Merge pull request #2453 from stefanhaller/allow-rebasing-to-first-commit 2023-02-20 19:21:37 +11:00
Jesse Duffield
0b55eaca1d add create tag from commit test 2023-02-20 19:01:08 +11:00
Jesse Duffield
39c56553b3 show tag message 2023-02-20 19:01:08 +11:00