1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-16 09:27:37 +03:00
Commit Graph

700 Commits

Author SHA1 Message Date
Stefan Haller
3415ed975b Offer to force-delete a worktree if it contains submodules 2025-10-14 12:19:49 +02:00
Stefan Haller
e44d6ec330 Replace paging config with an array of pagers 2025-10-14 12:17:13 +02:00
Stefan Haller
5d02cba721 Show "Log (x of y)" in the title bar when there is more than one branch log command 2025-10-10 12:49:42 +02:00
Krystof Gartner
703f053a7e Add merge options menu
Replace merge-tool with merge options menu that allows resolving all
conflicts for selected files as ours, theirs, or union, while still
providing access to the merge tool.
2025-10-09 08:45:58 +02:00
Torben Koch
308a4d5c93 fix command description typo 2025-09-18 12:24:25 +02:00
Stefan Haller
d52ff052bb Update translations from crowdin 2025-09-05 10:47:51 +02:00
Stefan Haller
5a630aeda1 Refactor: add a separate Prompt view
So far, confirmations and prompts were handled by the same view, context, and
controller, with a bunch of conditional code based on whether the view is
editable. This was more or less ok so far, since it does save a little bit of
code duplication; however, now we need separate views, because we don't have
dynamic keybindings, but we want to map "confirm" to different keys in
confirmations (the "universal.confirm" user config) and prompts (hard-coded to
enter, because it doesn't make sense to customize it there).

It also allows us to get rid of the conditional code, which is a nice benefit;
and the code duplication is actually not *that* bad.
2025-09-05 10:42:03 +02:00
Stefan Haller
5cb80b8635 Fix command log for stash commands
With the exception of Rename Stash, they would all just log "Stash".
2025-08-25 19:23:30 +02:00
Stefan Haller
548244c0b7 Add breaking changes notice about git.paging.useConfig option 2025-08-19 11:54:54 +02:00
kyu08
3fa5a8eddd Add "CopyToClipboard" command to ConfirmationController 2025-08-15 17:17:06 +02:00
Jesse Duffield
7ed946951f Update donation wording so that it's clear there's no strings attached 2025-08-15 19:51:50 +10:00
Stefan Haller
4bc1ba22c1 Add a breaking changes notice for the changed keybinding 2025-08-14 20:42:21 +02:00
cowboy8625
0f38d2d61e Implement suspending the app using ctrl-z
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2025-08-14 20:41:46 +02:00
Stefan Haller
a8e44dcea6 Show context-specific labels for the global <esc> binding
WHen several modes are active at the same time, it isn't totally obvious which
one will be cancelled first, so show this in the status bar.
2025-08-14 17:59:38 +02:00
Stefan Haller
a08799ac15 Allow filterable contexts to customize the filter label 2025-08-14 15:02:48 +02:00
Stefan Haller
d869c23c1a Fix the useHunkModeInStagingView hint in the breaking changes message 2025-08-06 19:26:00 +02:00
Stefan Haller
8bf58f9a6b Update translations from Crowdin 2025-08-01 11:07:35 +02:00
Stefan Haller
c216388b5c Add breaking changes notice about hunk mode being the default now 2025-08-01 10:35:17 +02:00
Stefan Haller
117bb3f829 Cleanup: whitespace 2025-08-01 10:35:17 +02:00
Stefan Haller
3d703bc9b9 Show hint about hunk staging mode being the default now, and how to switch to line mode
It is shown the first time the user enters either staging or patch building.
2025-08-01 10:35:17 +02:00
Stefan Haller
eb41bd2af2 Change the "toggle hunk selection" binding description to be dynamic
When the useHunkModeInStagingView config is on and you enter the staging view
with hunk selection enabled, it is confusing to see "a: Select hunk" in the
options view at the bottom.
2025-08-01 10:35:16 +02:00
Stefan Haller
05b27c390d Make the minimum required git version a placeholder in the error text
This way we don't have to update the text and all translations every time we
bump the version.

Remove the year from the error text, it's cumbersome to update and I don't find
it very important to have in the message.

Also remove the invitation to file an issue; I don't find it very likely that we
are going to relax the minimum git requirement again.
2025-07-28 13:10:25 +02:00
Dawid Pietrykowski
238fdd573c Add confirmation for nuking the working tree 2025-07-13 14:04:14 +02:00
kyu08
d41668f565 Fix last branch to previous branch in TranslationSet.CheckoutByNameTooltip 2025-07-12 18:17:45 +02:00
kyu08
5b1292006d Add new command "Checkout previous branch" 2025-07-12 18:17:25 +02:00
Stefan Haller
df48667253 Add a prompt for the sort order menus for branches 2025-07-09 13:16:42 +02:00
Stefan Haller
6bfcb3d6f0 Add tooltips for commit log menu 2025-07-09 13:16:42 +02:00
Stefan Haller
9650753db6 Add configuration hints to existing tooltips 2025-07-09 13:16:42 +02:00
Stefan Haller
0d4f0e827d Add breaking changes entry for the changed sort order for branches 2025-07-09 13:15:03 +02:00
Stefan Haller
e27422f894 Bump minimum required git version to 2.32
The version choice is a little arbitrary, but see discussion at
https://github.com/jesseduffield/lazygit/pull/4559#issuecomment-2876201680.

The main reason why I'm updating the version now is that versions before 2.27
had a bug with branch sorting, where sorting by -committerdate (which will be
our default soon) would sort branches that point at the same commit in reverse
alphabetical order rather than alphabetical order. While this is only slightly
annoying but not a huge deal for users, it makes maintaining our integration
tests across versions very hard. So I wanted to update to at least 2.27 to get
around this problem, and went with 2.32 after the discussion linked to above.

The choice of which versions to run integration tests on is pretty arbitrary
too, I just picked some at random which are about 5 to 6 minor versions apart.
2025-07-09 12:18:57 +02:00
Stefan Haller
7153305174 Add confirmation for hard reset when there are uncommitted changes 2025-07-08 16:41:22 +02:00
Stefan Haller
73bf49f8d8 Remove deprecated edit configs
They were deprecated in April 2023 (see 046b0d9daa), so it's been well over a
year now.
2025-07-08 16:32:21 +02:00
Stefan Haller
8f48ad7572 Remove unused TranslationSet fields
These were found by commenting out the initialization of the struct literal in
EnglishTranslationSet.TranslationSet(), and then running

$ punused pkg/i18n/**/*.go

Punused can be installed with `go install github.com/bep/punused@latest`.
2025-07-08 15:54:07 +02:00
Stefan Haller
9290c074f7 Update translations from Crowdin 2025-07-04 18:22:13 +02:00
Stefan Haller
6b1cab7011 Auto-stash if necessary when reverting commits 2025-07-03 17:04:10 +02:00
Stefan Haller
3f3e942f60 Auto-stash if necessary when cherry-picking commits 2025-07-03 16:58:56 +02:00
Stefan Haller
e7cb469fd0 Remove unused text StashPrefix 2025-07-03 16:56:30 +02:00
Stefan Haller
9511ed9d2c Use a better name for the auto-stash for moving a custom patch to index 2025-07-03 16:56:30 +02:00
Stefan Haller
2a7ce19b73 Use a better name for the auto-stash for creating a new branch
For the case of creating a new branch by moving commits to it, we were using the
current (old) branch name in the stash name; change this to use the new name
instead.
2025-07-03 16:56:30 +02:00
Stefan Haller
908975c758 Use a better name for the auto-stash for checking out a branch 2025-07-03 16:53:49 +02:00
Stefan Haller
a83fc5e343 Use a better name for the auto-stash for undo 2025-07-03 16:53:49 +02:00
Stefan Haller
3df894ec92 Stage affected unstaged files when applying or reverting a patch
Unlike moving a patch to the index, applying or reverting a patch didn't
auto-stash, which means that applying a patch when there's a modified (but
unstaged) file in the working tree would error out with the message "error:
file1: does not match index", regardless of whether those modifications conflict
with the patch or not.

To fix this, we *could* add auto-stashing like we do for the "move patch to
index" command. However, in this case we rather simply stage the affected files
(after asking for confirmation). This has a few advantages:

- it only changes the staging state of those files that are contained in the
patch (whereas auto-stashing always changes all files to unstaged)
- it doesn't unnecessarily show a confirmation if none of the modified files are
affected by the patch
- if the patch conflicts with the modified files, the conflicts were "backwards"
("ours" was the patch, "theirs" the modified file); it is more logical if "ours"
is the current state of the file, and "theirs" is the patch.

It's a little unfortunate that the behavior isn't exactly the same as for "move
patch to index", but for that one we do need the auto-stash because of the
rebase that runs behind the scenes.
2025-07-02 16:19:06 +02:00
Stefan Haller
c752f3529b Remove the pick vs. pull hack
Previously we would call pullFiles() from the pick() handler if we were not in a
rebase, assuming that the default keybinding for both is "p". This needn't be
the case of course, if the user has remapped one or the other.

The consequence of this was that swapping the keybindings for "pullFiles" and
"pushFiles" would work in all panels except the Commits panel (unless "pick" was
also remapped in the same way).

Fix this by using the new AllowFurtherDispatching mechanism of DisabledReasons
to pass the keybinding on to the next handler.
2025-06-05 13:20:39 +02:00
Joshua Hollander
bb6c883761 Print default option when prompting to create a new git repo 2025-06-04 08:15:21 +02:00
Stefan Haller
450239d5c8 Add an alternate keybinding (default <c-s>) for ConfirmInEditor
The default binding for ConfirmInEditor is <a-enter>, which has two problems:
- some terminal emulators don't support it, including the default terminal on
  Mac (Terminal.app)
- on Windows it is bound to toggling full-screen

Ideally we would use <c-enter> instead (and Command-Enter on Mac), but neither
is possible without https://github.com/gdamore/tcell/issues/671, so for the time
being add an alternate keybinding which works everywhere.

Show both bindings in the footer of the commit description panel if they are
both non-null. While we're at it, fix the footer for the case where either or
both of the keybindings are set to <disabled>.

And finally, change "commit" to "submit" in that footer; we use the same panel
also for creating tags, in which case "commit" is not quite right.
2025-05-11 13:59:22 +02:00
Stefan Haller
f6d13330dd Add custom patch command "Move patch into new commit before the original commit"
This is often useful to extract preparatory refactoring commits from a bigger
one.
2025-05-10 18:57:28 +02:00
Stefan Haller
e8d365f1aa Add breaking change notice about 'stream: true' being converted to not use a pty any more 2025-05-01 16:09:10 +02:00
Stefan Haller
0496e3af50 Disallow creating custom patches when the diff context size is 0
This is very similar to what we are doing for staging or discarding hunks in the
Files panel. Git doesn't allow applying patches with a zero context size (unless
you use the --unidiff-zero option, which is discouraged).
2025-04-29 10:21:18 +02:00
Stefan Haller
30868eead8 Add new command "Move commits to new branch" 2025-04-21 18:12:50 +02:00
Stefan Haller
7495854243 Add a breaking changes hint for the new auto-forward behavior 2025-04-21 18:06:09 +02:00