1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-08 22:52:12 +02:00
Commit Graph

6901 Commits

Author SHA1 Message Date
stk
85c7b28544 Add documentation for pager workaround on Windows 2025-10-06 16:56:41 +02:00
stk
3372e2bdb6 Export a LAZYGIT_COLUMNS variable to "pty" tasks on Windows
This makes it possible to pass it to an external diff command that is
used like a pager. An example for this can be seen in the added
documentation in the next commit.
2025-10-06 16:56:34 +02:00
Stefan Haller
97762f484f Update Merge conflicts menu keybinding to use p instead of k (#4934) 2025-10-05 10:26:33 +02:00
Marco Zingoni
b32b55201e Update resolve conflict using p instead of k 2025-10-05 10:23:03 +02:00
Stefan Haller
f45e7ca705 Update go to 1.25 (#4844)
### PR Description
This PR includes 2 changes:
1. Bump golangci-lint version to `v2.4.0` from  `v.2.2.1`
1. Bump Go version to `1.25.0`:
	- Bump Go version to `1.25` in `go.mod`
	- Bump Go version to  `1.25` in `ci.yml`
	- Bump base image to `golang:1.25`  in `Dockerfile`

### Reference
- [Go 1.25 release note](https://tip.golang.org/doc/go1.25)
2025-10-05 10:21:49 +02:00
kyu08
93b8d70209 Update go to 1.25 2025-10-05 10:17:03 +02:00
kyu08
47b1ededf3 Bump golangci-lint to v.2.4.0 from v2.2.1 2025-10-05 10:17:03 +02:00
Stefan Haller
7544de03c0 Give better visual feedback when checking out the previous branch (#4929)
I find the command "Checkout previous branch" quite useful, and I use it
a lot. However, I'm unhappy with the visual feedback, so this PR
improves that a bit.

Previously, the feedback you got when pressing "-" was just a "Checking
out..." status in the bottom line. This was both easy to miss if you are
used to looking for an inline status in the branches panel, and it
didn't provide information about which branch was being checked out,
which can be annoying in very large repos where checking out takes a
while, and you only see at the end if you are now on the right branch.

Improve this by trying to figure out which branch was the previously
checked out one, and then checking it out normally so that you get an
inline status next to it (as if you had pressed space on it). There are
cases where this fails, e.g. when the previously checked out ref was a
detached head, in which case we fall back to the previous behavior.
2025-10-05 10:04:06 +02:00
Stefan Haller
e585accd37 Give better feedback when checking out the previous branch
Previously, the feedback you got when pressing "-" was just a "Checking out..."
status in the bottom line. This was both easy to miss if you are used to looking
for an inline status in the branches panel, and it didn't provide information
about which branch was being checked out, which can be annoying in very large
repos where checking out takes a while, and you only see at the end if you are
now on the right branch.

Improve this by trying to figure out which branch was the previously checked out
one, and then checking it out normally so that you get an inline status next to
it (as if you had pressed space on it). There are cases where this fails, e.g.
when the previously checked out ref was a detached head, in which case we fall
back to the previous behavior.
2025-10-02 18:28:17 +02:00
Stefan Haller
ba0e2d12da README.md: Update Sponsors (#4897)
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action
2025-10-02 17:32:53 +02:00
github-actions[bot]
385f796c90 README.md: Update Sponsors 2025-10-02 15:30:45 +00:00
Stefan Haller
05b6588e39 Don't break line after footnote symbol in commit messages (#4912)
Addresses #4900.
2025-10-02 17:30:32 +02:00
Stefan Haller
ef92e30315 Bump gocui
The main change here is https://github.com/jesseduffield/gocui/pull/85, which
avoids breaking lines after footnote symbols in commit messages (e.g. [1]).

[1]: https://www.example.com/this-is-a-really-long-url-that-lazy-git-automatically-wraps-and-is-an-issue
2025-10-02 17:28:13 +02:00
Stefan Haller
cb2b5c3738 Hide the cursor when the password prompt is showing (#4878)
The cursor is a bit of a security concern, because it reveals the length
(and typing pattern) of the password.

Resolves #4877.
2025-09-20 11:14:05 +02:00
Stefan Haller
851afe94f5 Hide the cursor when the password prompt is showing
The cursor is a bit of a security concern, because it reveals the length (and
typing pattern) of the password.
2025-09-20 11:11:46 +02:00
Stefan Haller
6941b81992 Don't log the git rev-list command that we use for IsBranchMerged (#4896)
When you delete a branch, we call this function to determine whether we
need to ask for confirmation of not. We don't want to log this, because
it's not a command that a user would normally use as part of this
operation.
2025-09-20 11:11:00 +02:00
Stefan Haller
2b152dcf5e Don't log the git rev-list command that we use for IsBranchMerged
When you delete a branch, we call this function to determine whether we need to
ask for confirmation of not. We don't want to log this, because it's not a
command that a user would normally use as part of this operation.
2025-09-20 11:07:43 +02:00
Stefan Haller
bbef570225 Make running with --debug and running integration tests work when built with go 1.25 (#4910)
The go-deadlock package needed to be updated to be compatible with go
1.25.
2025-09-20 11:07:18 +02:00
Stefan Haller
f689b32c33 Bump the go-deadlock dependency to v0.3.6
This is needed for compatibility with go 1.25.
2025-09-20 10:51:37 +02:00
Stefan Haller
d56a9cf73e Fix MoveCommitsToNewBranch description typo (#4867) 2025-09-18 12:29:23 +02:00
Torben Koch
308a4d5c93 fix command description typo 2025-09-18 12:24:25 +02:00
Stefan Haller
3de12b7fde Fix staging when using the new useExternalDiffGitConfig config (#4895)
This new config was introduced in 0.55, but it made it impossible to
enter the staging view or custom patch building view.

Fixes
https://github.com/jesseduffield/lazygit/pull/4832#issuecomment-3289371491.
v0.55.1
2025-09-17 20:39:08 +02:00
Stefan Haller
c35e3776dd Fix staging when using the new useExternalDiffGitConfig config
This new config was introduced in 0.55, but it didn't work in the staging view
or custom patch building view.
2025-09-17 20:37:14 +02:00
Stefan Haller
b4a38a368a Don't hide keybindings that match the confirmMenu key in the keybindings menu (#4880)
In all other menus besides the keybindings menu it makes sense to hide
keybindings that match the confirmMenu binding. This is important to
make it clear which action will be triggered when you press the key.

In the keybindings menu this is different; the main purpose of that menu
is not to allow triggering commands by their key while the menu is open,
but to serve as a reference for what the keybindings are when it is not
open. Because of this, it is more important to show all bindings in this
menu, even if they conflict with the confirmMenu key.

This fixes a regression introduced in b3a3410a1a.

Fixes #4879.
2025-09-15 17:02:50 +02:00
Stefan Haller
26096d9dd9 Don't hide keybindings that match the confirmMenu key in the keybindings menu
In all other menus besides the keybindings menu it makes sense to hide
keybindings that match the confirmMenu binding. This is important to make it
clear which action will be triggered when you press the key.

In the keybindings menu this is different; the main purpose of that menu is not
to allow triggering commands by their key while the menu is open, but to serve
as a reference for what the keybindings are when it is not open. Because of
this, it is more important to show all bindings in this menu, even if they
conflict with the confirmMenu key.

This fixes a regression introduced in b3a3410a1a.
2025-09-07 12:43:54 +02:00
Jesse Duffield
0d5a410114 Update README.md v0.55.0 2025-09-06 17:11:27 +10:00
Jesse Duffield
0553c00f61 Update README.md 2025-09-06 16:56:50 +10:00
Jesse Duffield
d65f638869 Update README.md 2025-09-06 16:51:31 +10:00
Jesse Duffield
2602426d43 README.md: Update Sponsors (#4795)
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action
2025-09-06 09:42:07 +10:00
github-actions[bot]
a0af7403cc README.md: Update Sponsors 2025-09-05 17:00:11 +00:00
Stefan Haller
900d8be359 Add dev container feature as installation method to README (#4876)
### PR Description

Implements #4874
2025-09-05 18:59:58 +02:00
Henning Lorenzen
4c686fc66e Update README.md 2025-09-05 18:47:51 +02:00
Stefan Haller
2469420efd Update translations from Crowdin (#4873) 2025-09-05 10:50:09 +02:00
Stefan Haller
d52ff052bb Update translations from crowdin 2025-09-05 10:47:51 +02:00
Stefan Haller
c0805f117e Make it possible to rebind the Confirm keybinding (#4860)
### PR Description

Remapping `keybinding.universal.confirm` from `<enter>` to something
like `y` is currently impossible because the same keybinding is also
used to confirm prompts (e.g. "New branch") and the search prompt. Fix
this by hard-coding enter for those; it doesn't really make sense to use
any other key for prompts.

While at it, add separate bindings for `confirmMenu` and
`confirmSuggestion` for those who would like to have different keys for
these. Of these, `confirmMenu` could be a little tricky because menus
are sometimes used purely as a choice (e.g. in "Amend commit attribute"
or the global keybindings menu), in which case you might want to use
`<enter>`, but other times as a substitute for a confirmation (e.g. for
"Delete branch"), in which case you might want to remap to `y`. I don't
have a great idea what to do about that, to be honest. Feedback welcome.

In this PR we only take care of Confirm, which many people seem to be
concerned about. We might consider doing something similar for Esc, but
it seems less urgent, and I'm out of time now. 😄

This seemingly simple change required some serious refactoring under the
hood, so thorough testing would be good to ensure we didn't break
anything.

Closes #2611
Closes #2767
Closes #3471

Related: #2768
2025-09-05 10:46:33 +02:00
Stefan Haller
b3a3410a1a Remove keybindings for menu items that are the same as the menu confirm key
This is needed when remapping the confirmMenu key to, say, "y", and there's a
menu that has an item with a "y" binding. This already worked correctly (confirm
takes precedence, as desired), but it's still confusing to see the item binding.
2025-09-05 10:42:04 +02:00
Stefan Haller
b413710d8c Add separate keybindings for confirmMenu and confirmSuggestion
It seems useful to have the flexibility to remap "enter" in confirmations to
"y", but keep "enter" for menus and suggestions (even though we sometimes use
menus as confirmations, but it's still good to give users the choice).
2025-09-05 10:42:04 +02:00
Stefan Haller
81868de264 Hard-code "enter" for adding lines in integration tests
This one doesn't make a difference in practice because we don't remap the key in
tests, but if we would, then this would no longer work correctly. It's just more
correct this way.
2025-09-05 10:42:04 +02:00
Stefan Haller
ea7050437d Fix <enter> keybinding for switching to a worktree
The universal.confirm keybinding is the wrong one to use for this, we want
universal.goInto instead. They are both bound to "enter" by default, but when
remapping confirm to "y" we don't want to use that for entering worktrees.
2025-09-05 10:42:04 +02:00
Stefan Haller
6303c64232 Hard-code "enter" for search prompt
Like with the previous commit, it doesn't make sense to use any other key than
enter for the search prompt.
2025-09-05 10:42:04 +02:00
Stefan Haller
b006c83181 Hard-code "enter" for editable prompts
Rebinding the universal.confirm keybinding currently doesn't make sense, because
the rebound key would also be used for editable prompts, which means you would
only be able to bind it to a ctrl key (not "y", which is desirable for some
people), and also it would allow you to enter a line feed in a branch name.

Fix this by always using enter for editable prompts.
2025-09-05 10:42:04 +02:00
Stefan Haller
0a64e1abb3 Update cheatsheets for the previous commit
Done in a separate commit because the diff is already so long.
2025-09-05 10:42:03 +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
94aa1101c9 Fix rare crash in interactive rebase (merge command without comment) (#4872)
This fixes a crash in an interactive rebase when there's a merge command
in the rebase-todo file that doesn't have a comment. I don't know under
what circumstances this can happen; git itself doesn't produce these,
but it is theoretically possible for the user to do this manually by
doing `git rebase --edit-todo`, or third-party tools could do it too.

We had one user report a crash because of this, so it seems worth fixing
it.

Closes #4858.
2025-09-05 10:41:23 +02:00
Stefan Haller
ffccfd6e42 Bump git-todo-parser
This fixes a crash in an interactive rebase when there's a merge command in the
rebase-todo file that doesn't have a comment. I don't know under what
circumstances this can happen; git itself doesn't produce these, but it is
theoretically possible for the user to do this manually by doing `git rebase
--edit-todo`, or third-party tools could do it too.

We had one user report a crash because of this, so it seems worth fixing it.
2025-09-05 10:37:20 +02:00
Stefan Haller
2bf2c38e9b docs(VISION): fix "Dicoverability" typo (#4866) 2025-09-03 09:29:49 +02:00
Ricardo Fernández Serrata
83f95bf8fe docs(VISION): fix "Dicoverability" typo 2025-09-03 00:52:38 -04:00
Stefan Haller
be0d7a6e73 Log the hash of dropped stashes (#4850)
### PR Description

If you dropped/popped a stash accidentally, the logged hash can help
recover it more easily.

Supersedes #4847.
2025-08-26 14:02:43 +02:00
Stefan Haller
438f5c0eda Log hashes when dropping/popping stashes
If you dropped/popped a stash accidentally, the logged hash can help recover it
more easily.
2025-08-25 19:23:30 +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