1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-08 04:01:59 +03:00
Commit Graph

6621 Commits

Author SHA1 Message Date
b07c4fc001 Updated README.md 2023-05-20 03:01:38 +00:00
2304ffc804 Merge pull request #2641 from stefanhaller/visualize-ignore-whitespace-config 2023-05-20 13:01:22 +10:00
401610c0ef Remove the toast when toggling "ignore whitespace"
Now that we visualize the state, the toast is no longer needed.
2023-05-20 12:58:32 +10:00
64b2685c2d Visualize the "ignore whitespace" state in the subtitle of the diff view 2023-05-20 12:58:32 +10:00
7d4bfb6621 Don't toggle "ignore whitespace" in the staging and patch building panels
The option doesn't have any affect in these views, so we don't need to toggle it
here. But the problem was the HandleFocus call at the end: this would activate
the wrong view, so we need to avoid it here.

Show an error if the user tries to turn the option on, to let them know that it
doesn't work here.
2023-05-20 12:58:32 +10:00
a2778f01c6 Disregard the "ignore whitespace" option in the patch building panel
It's not possible to reliably stage things into a custom patch when "ignore
whitespace" is on, so always treat it as off here (like we do in the staging
panel).

It looks like this is a regression that was introduced in 8edad826ca.
2023-05-19 18:22:28 +02:00
d161afe37f Support ignoring whitespace on stash 2023-05-19 17:49:22 +02:00
3dd96a8010 Updated README.md 2023-05-17 07:12:19 +00:00
681a9bf20d Merge pull request #2612 from longlhh90/fix-commit-prefixes-with-empty-commit-message 2023-05-17 17:12:05 +10:00
0606b7a43b remove empty message check as message of commit can be empty 2023-05-17 17:07:50 +10:00
33da56eeb4 Merge pull request #2619 from stefanhaller/config-for-base-branches
Add config for main branches
2023-05-16 13:23:56 +02:00
46b93bba0e Add config git.mainBranches
It defaults to {"master", "main"}, but can be set to whatever branch names
are used as base branches, e.g. {"master", "devel", "v1.0-hotfixes"}. It is
used for color-coding the shas in the commit list, i.e. to decide whether
commits are green or yellow.
2023-05-16 13:20:03 +02:00
d2d50aedd0 Updated README.md 2023-05-16 11:13:36 +00:00
ea5fb6a364 Merge pull request #2629 from jesseduffield/try-fix-conflict-continue-prompt 2023-05-16 21:13:17 +10:00
a82134f41c Fix race condition
Our refresh code may try to push a context. It does this in two places:
1) when all merge conflicts are resolved, we push a 'continue merge?' confirmation context
2) when all conflicts of a given file are resolved and we're in the merge conflicts context,
   we push the files context.

Sometimes we push the confirmation context and then push the files context over it, so the user
never sees the confirmation context.

This commit fixes the race condition by adding a check to ensure that we're still in the
merge conflicts panel before we try escaping from it
2023-05-16 21:01:38 +10:00
00b03079d8 Don't deactivate context that you're about to activate 2023-05-16 21:01:38 +10:00
9592686629 Compare contexts with keys
We don't want to compare contexts directly given they are interfaces and not
pointers to structs
2023-05-16 21:01:38 +10:00
114ad52ff6 Rename CmdLog -> GuiLog
We want to log both actions and commands for the sake of integration tests
2023-05-16 21:01:38 +10:00
9514284f8e Merge pull request #2608 from stefanhaller/allow-selected-line-outside-view
Allow the selected line of a list view to be outside the visible area
2023-05-13 12:29:17 +02:00
ece14844bb Updated README.md 2023-05-13 02:33:48 +00:00
9910a7c308 Merge pull request #2628 from stefanhaller/make-merged-take-precedence-over-unpushed 2023-05-13 12:33:34 +10:00
910a61dc46 Make "merged" take precedence over "unpushed"
Previously, when rebasing a branch onto a newer master, all commits from the
previous fork point up to its head were marked red (unpushed), including the
commits that are on master already. While this is technically correct from the
perspective of the current branch's upstream, it's not what most people expect,
intuitively; they want to see where the current branch starts, relative to
master. So all commits of master should be green, and then the commits of the
current branch in red.
2023-05-12 22:56:58 +02:00
e5dd4d3110 Allow the selected line of a list view to be outside the visible area
I don't see a reason why this restriction to have the selection be always
visible was necessary. Removing it has two benefits:

1. Scrolling a list view doesn't change the selection. A common scenario: you
   look at one of the commits of your current branch; you want to see the how
   many'th commit this is, but the beginning of the branch is scrolled off the
   bottom of the commits panel. You scroll down to find the beginning of your
   branch, but this changes the selection and shows a different commit now - not
   what you want.

2. It is possible to scroll a panel that is not the current one without changing
   the focus to it. That's how windows in other GUIs usually behave.
2023-05-11 13:23:58 +02:00
595c7ee73e Extend one of the filtering tests to start on a commit other than the first
Enabling the filter selects the first entry in the filtered commits view. It's
useful to have a test that checks this, as I almost broke it in the following
commit (it needs an added FocusLine call in the setFiltering function in
filtering_menu_action.go).
2023-05-11 13:23:58 +02:00
051af6a066 Updated README.md 2023-05-11 09:09:15 +00:00
e2d7e461a8 Merge pull request #2519 from jesseduffield/refactor-better-encapsulation 2023-05-11 19:09:01 +10:00
7c66ca83c1 update cheatsheets 2023-05-11 19:02:25 +10:00
007b406b14 remove duplicate method 2023-05-11 19:00:41 +10:00
2b30085dba Merge branch 'master' into refactor-better-encapsulation 2023-05-11 19:00:01 +10:00
5c95d23169 Merge pull request #2620 from jesseduffield/yaml 2023-05-11 09:14:57 +10:00
e156e090cc add ability to update yaml path while preserving comments 2023-05-10 22:31:27 +10:00
0accb07dcc Merge pull request #2591 from screendriver/nvim 2023-05-04 16:55:22 +10:00
3cac14c76e add comment to encourage keeping code and docs in sync 2023-05-04 16:53:13 +10:00
1636931c2b Include "kakoune" in supported edit presets 2023-05-04 08:28:58 +02:00
6e027f42da Include "nvim" in supported edit presets 2023-05-03 13:30:51 +02:00
5149b24ab3 Merge pull request #2585 from stefanhaller/only-use-empty-arg-when-available v0.38.2 2023-05-03 17:59:07 +10:00
c520c5cfc3 Merge pull request #2588 from jesseduffield/update-open-docs 2023-05-03 13:48:50 +10:00
c88ecdf87c update open docs 2023-05-03 13:48:04 +10:00
d607b366cb Add own version for test move_to_earlier_commit for older git versions 2023-05-02 16:27:32 +02:00
c8f26aca68 Rename From to AtLeast 2023-05-02 16:27:32 +02:00
30656b5ac6 chore(git_commands): support old git version (git rebase --empty=keep) 2023-05-02 16:27:32 +02:00
5dacbb6293 merge master into refactor-better-encapsulation 2023-05-02 19:05:42 +10:00
88d4313970 Updated README.md v0.38.1 2023-05-02 08:59:25 +00:00
4160fa518c Merge pull request #2582 from stefanhaller/config-for-showing-branch-heads 2023-05-02 18:59:12 +10:00
fba1a2b5ac Add config gui.experimentalShowBranchHeads
People find the new (*) display for branch heads in the commits list confusing,
so make it opt-in for now.
2023-05-02 18:58:54 +10:00
c6c4346d48 Merge pull request #2551 from stefanhaller/fix-initial-context-activation v0.38.0 2023-05-01 21:22:43 +10:00
ee9ae8f07f Merge pull request #2552 from stefanhaller/support-stacked-branches 2023-05-01 21:07:19 +10:00
8d68ab41b6 Merge branch 'refactor-better-encapsulation' into test-refactor 2023-04-30 14:02:16 +10:00
af97bf484c Refresh staging panel when committing
We now refresh the staging panel when doing an unscoped refresh, so that if we commit from the staging panel we escape
back to the files panel if need be. But that causes flickering when doing an unscoped refresh from other contexts,
because the refreshStagingPanel function assumes that the staging panel has focus. So we're adding a guard at the top
of that function to early exit if we don't have focus.
2023-04-30 13:19:54 +10:00
a57310df24 Retain commit message when cycling history
When cycling history, we want to make it so that upon returning to the original prompt, you get your text back.
Importantly, we don't want to use the existing preservedMessage field for that because that's only for preserving
a NEW commit message, and we don't want the history stuff of the commit reword flow to overwrite that.
2023-04-30 13:19:54 +10:00