1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00
Commit Graph

6505 Commits

Author SHA1 Message Date
9c384c5267 Clean up helix editor preset 2023-05-26 09:19:12 +10:00
d772c9f1d4 Use sentence case everywhere
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE.

Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything
is in 'Sentence case' there's no need for the distinction.

I've got a couple lower case things I've kept: namely, things that show up in parentheses.
2023-05-25 23:52:19 +10:00
e5534d9781 Merge pull request #2668 from dvic/add-helix-support 2023-05-25 19:59:14 +10:00
34755285a1 Merge pull request #2671 from jesseduffield/global-logging-for-development 2023-05-25 18:41:27 +10:00
e0ecc9e835 Allow global logging when developing
I'll be honest, for all I know logging should be global in general: it is
a pain to pass a logger to any struct that needs it. But smart people on the
internet tell me otherwise, and I do like the idea of not having any global
variables lying around.

Nonetheless, I often need to log things when locally debugging and that's a
different kind of logging than the kind you would include in the actual
released binary. For example if I want to log something from gocui, I would
rather not have gocui depend on lazygit's logging setup.
2023-05-25 18:31:32 +10:00
add1de4138 Use boolean field to control whether viewport is refreshed on line focus
Go really doesn't like us doing anything inheritance-y: it does not support open recursion meaning
it's really hard to re-use code. As such, here we're falling back to conditional logic.

This fixes an issue where our ListContextTrait was calling FocusLine which was intended to be
overridden by ViewportListContextTrait, but the subclassed function wasn't being called. I'm
not actually sure how this went wrong given that it was working fine in the past, but at any rate,
the new code is easy to follow.
2023-05-25 17:09:18 +10:00
ed496deeca Add helix editor preset 2023-05-24 23:08:26 +02:00
1f8e838052 Merge pull request #2656 from mazharz/gitlab-merge-request-url
Update gitlab merge request URL to match new routing
2023-05-23 22:54:57 +10:00
f212e19efd Merge pull request #2662 from jesseduffield/patches-for-update-args-vector 2023-05-23 20:30:15 +10:00
fb0931e1a1 Fix discard logic
Missed a spot a couple PR's ago. We had an integration test which caught this but which was skipped due
to index.lock file issues. The test was also broken for other reasons due to it not having been running
for a while, so I've fixed that up too.
2023-05-23 20:23:08 +10:00
ee1597415d Merge pull request #2655 from jesseduffield/use-command-args-vector 2023-05-23 19:55:09 +10:00
63dc07fded Construct arg vector manually rather than parse string
By constructing an arg vector manually, we no longer need to quote arguments

Mandate that args must be passed when building a command

Now you need to provide an args array when building a command.
There are a handful of places where we need to deal with a string,
such as with user-defined custom commands, and for those we now require
that at the callsite they use str.ToArgv to do that. I don't want
to provide a method out of the box for it because I want to discourage its
use.

For some reason we were invoking a command through a shell when amending a
commit, and I don't believe we needed to do that as there was nothing user-
supplied about the command. So I've switched to using a regular command out-
side the shell there
2023-05-23 19:49:19 +10:00
70e473b25d Updated README.md 2023-05-23 09:20:04 +00:00
1a4cf84b58 Merge pull request #2661 from jesseduffield/cache-binary-paths
Cache binary paths
2023-05-23 19:19:49 +10:00
ad72a1f5a3 Cache binary paths
Turns out that with our secureexec package (which we only use on windows due to a windows security thing),
2023-05-23 19:15:33 +10:00
59379b45da Update gitlab commit URL to match new routing 2023-05-22 07:39:47 +03:30
2d4ca2b54f Update gitlab merge request URL to match new routing 2023-05-21 13:21:34 +03:30
ec5075104a Merge pull request #2644 from stefanhaller/remove-empty=keep-option-when-rebasing
Don't keep commits that become empty during a rebase
2023-05-21 07:45:21 +02:00
6f535d71c9 Merge pull request #2652 from jesseduffield/right-align-columns 2023-05-21 12:30:53 +10:00
ec3a28df43 Right-align key labels in menu
I find this makes it look a little nicer
2023-05-21 12:09:43 +10:00
5b933762c2 Merge pull request #2651 from jesseduffield/strikethrough-menu 2023-05-21 11:34:19 +10:00
3eed997161 Update cheatsheet
Now that we're using the angle-bracket syntax everywhere for consistency, we need to escape
the angle brackets in the markdown of the cheatsheets.
2023-05-21 11:31:29 +10:00
526d8a8a76 Fix cheatsheet generate VSCode task
This was previously not working because we tried to run the whole string as its own process
2023-05-21 11:31:29 +10:00
e1fc90615d Apply strikethrough style to reserved keybindings in menus
If a given menu item has an associated keybinding of 'enter', hitting enter won't actually execute
that item unless your cursor is on it. This creates confusion, and so we're going to use a strikethrough
style to communicate that the keybinding is reserved for something else.
2023-05-21 11:31:29 +10:00
460a166e16 Stop displaying navigation keybinding at bottom of screen
The reason for this is that now our labels for navigation keybindings are larger so they
take up more realestate. It's not the kind of thing a user needs to be told anyway,
anybody is going to try out hjkl and the arrow keys when a TUI opens up.

We could map from <up> to the single character up unicode rune but given you can rebind this stuff
I'd rather keep it simple
2023-05-21 11:01:15 +10:00
2e66d87b94 Use same labels for keys that we use in the config
Previously we were displaying keys in a different format than we expected them in the config.
This was certain to cause confusion.
2023-05-21 10:59:16 +10:00
820f7b9404 Support strikethrough text style 2023-05-21 10:46:13 +10:00
3cddd7cfa5 Don't keep commits that become empty during a rebase
The only exception is when moving a custom patch for an entire commit to an
earlier commit; in this case the source commit becomes empty, but we want to
keep it, mainly for consistency with moving the patch to a later commit, which
behaves the same.

In all other cases where we rebase, it's confusing when empty commits are kept;
the most common example is rebasing a branch onto master, where master already
contains some of the commits of our branch. In this case we simply want to drop
these.
2023-05-20 21:10:03 +02:00
2e0d0a92ee Merge pull request #2647 from jesseduffield/fix-tip 2023-05-20 23:40:31 +10:00
ed857d1e07 Show correct keybinding in tip 2023-05-20 23:36:34 +10:00
b30ec538fb Merge pull request #2645 from jesseduffield/convenient-git-command-building 2023-05-20 20:58:18 +10:00
ee11046d35 Refactor interface for ApplyPatch 2023-05-20 20:54:39 +10:00
25f8b0337e Add convenience builder for git commands 2023-05-20 20:54:24 +10:00
63ddc52a6b Increase test coverage 2023-05-20 16:55:15 +10:00
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