1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-24 08:52:21 +02:00
Commit Graph

5449 Commits

Author SHA1 Message Date
pikomonde
fccfbf1f63 rename sha to hash 7, language translate 2024-04-12 08:33:47 +02:00
pikomonde
05fb12b1d5 rename sha to hash 6, update short hash 2024-04-12 08:33:47 +02:00
pikomonde
9cf1ca10a2 rename sha to hash 5 2024-04-12 08:33:47 +02:00
pikomonde
dc6863b83d rename sha to hash 4 2024-04-12 08:33:47 +02:00
pikomonde
13af335b37 rename sha to hash 3 2024-04-12 08:33:47 +02:00
pikomonde
92aab21d3a rename sha to hash 2 2024-04-12 08:33:47 +02:00
pikomonde
e6ef1642fa rename sha to hash 2024-04-12 08:33:47 +02:00
pikomonde
84333eebc3 renaming variable to CommitHash 2024-04-12 08:33:47 +02:00
pikomonde
7f6eea2a55 standardize 'Commit Sha' to 'Commit Hash' 2024-04-12 08:31:40 +02:00
Stefan Haller
06624e85d6
Add StatusPanelView config (#3309)
Adds a new config `statusPanelView ` which allows you to select the
default view of the main window: `dashboard` (default),
`allBranchesLog`.
2024-04-10 17:43:36 +02:00
oakio
5616d6a9bc Dynamic copyright year 2024-04-10 17:38:57 +02:00
oakio
5c3aacb4cb UserConfig validation 2024-04-10 17:38:57 +02:00
oakio
2b5c814080 Add StatusPanelView config 2024-04-10 17:38:57 +02:00
Stefan Haller
4ba85608c8
Fix stderr redirection (#3479)
- **PR Description**

Seems that there's a problem in the Stdout/Stderr/Stdin stream vars
assignments,
probably copy-paste issue.

If this is intentional, I suggest adding an explanation on why `Stderr`
-> `Stdout` intentionally to avoid other PRs and confused people around
:)

Thanks!
2024-04-09 09:10:35 +02:00
Emanuele "Lele" Calo
a63c660f28 Fix stderr redirection
Seems that there's a problem in the Stdout/Stderr/Stdin vars
assignments, probably copy-paste issue.
2024-04-09 09:08:14 +02:00
Stefan Haller
fab7ca2b58
Fix issue #3308 (#3478)
- **PR Description**

It seems that setting TERM=dumb breaks compatibility with curses
subprocess in Go, especially with `pinentry-curses`

This fixes #3308
2024-04-09 09:07:44 +02:00
Emanuele "Lele" Calo
7b0e06d885 TERM: remove TERM variable hard-coded value set 2024-04-09 04:15:03 +02:00
Jesse Duffield
426375b7cd
Replace min/max helpers with built-in min/max (#3482)
- **PR Description**

We upgraded our minimum Go version to 1.21 in commit
57ac9c2189. We can now replace our
`utils.Min` and `utils.Max` functions with the built-in `min` and `max`.

Reference: https://go.dev/ref/spec#Min_and_max

- **Please check if the PR fulfills these requirements**

* [x] Cheatsheets are up-to-date (run `go generate ./...`)
* [x] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [ ] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [ ] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [ ] Docs (specifically `docs/Config.md`) have been updated if
necessary
* [x] You've read through your own file changes for silly mistakes etc

<!--
Be sure to name your PR with an imperative e.g. 'Add worktrees view'
see https://github.com/jesseduffield/lazygit/releases/tag/v0.40.0 for
examples
-->
2024-04-08 09:31:14 +10:00
Eng Zer Jun
f933a2f7ec
Replace min/max helpers with built-in min/max
We upgraded our minimum Go version to 1.21 in commit
57ac9c2189. We can now replace our
`utils.Min` and `utils.Max` functions with the built-in `min` and `max`.

Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-04-07 23:24:10 +08:00
Stefan Haller
ed61b9a7f2
pkg: fix some comment (#3481) 2024-04-07 11:06:42 +02:00
hongkuang
d8c1eb879b pkg: fix some comment
Signed-off-by: hongkuang <liurenhong@outlook.com>
2024-04-07 16:09:26 +08:00
Stefan Haller
c02408bba0
Add spinner config options (#3463)
- **PR Description**

Add `spinner` config section to the user config. The section has 2
options:
- `frames` - list of strings that are iterated in the spinner animation
- `rate` - spinner's rate in milliseconds

Closes #3435
2024-04-06 13:49:51 +02:00
Artem Belyakov
f3dba743f0 Add SpinnerConfig
This new config section allows to customize frames and rate of
thespinner
2024-04-06 13:46:15 +02:00
Stefan Haller
53f0c4aeff
Migrate null keybindings to <disabled>, and remove our yaml fork (#3459)
- **PR Description**

Migrate users' config files to change all `null` keybindings to
`"<disabled>"`. Then remove our yaml fork, since that was the only
reason we were using it.

Fixes #3458.
2024-04-01 11:15:02 +02:00
Stefan Haller
84e82ea8b6 fixup! Introduce a yaml_utils.Walk function 2024-03-30 13:05:33 +01:00
Stefan Haller
8487bc397d Remove our yaml fork
Switch back to the official go-yaml package.
2024-03-29 17:55:06 +01:00
Stefan Haller
93aee0dca0 Migrate null keybindings to "<disabled>"
Unfortunately the migration code requires yaml v3, but our yaml fork is based on
v2, so we need to import both in app_config.go in this commit, which is ugly. We
can clean this up in the next commit.
2024-03-29 17:55:06 +01:00
Stefan Haller
4d8b8b647a Introduce a yaml_utils.Walk function 2024-03-29 17:55:06 +01:00
Stefan Haller
2385c1d111
Make URLs in confirmation panels clickable, and underline them (#3446)
- **PR Description**

This is especially helpful for the breaking changes popup, which has a
link to the release notes, but it could also be useful for other panels
that display some warning or error with a link to more information.
2024-03-29 10:58:55 +01:00
Stefan Haller
5d509efe19 Underline links in confirmation panels 2024-03-29 10:55:33 +01:00
Stefan Haller
b9a75ee0ed Make links clickable in confirmation panels
This is not opt-in, we do it always. I can't imagine a situation where we
wouldn't want it.
2024-03-29 10:55:33 +01:00
Stefan Haller
d102f12304 Make HandleGenericClick a little smarter
Make it recognize URLs wrapped in angle brackets, and followed by punktuation.
We don't need this for the status panel, but we will need it for confirmation
panels.
2024-03-29 10:55:33 +01:00
Stefan Haller
6396d1ce03 Extract a function HandleGenericClick 2024-03-29 10:55:33 +01:00
Stefan Haller
c59e6b6451 Cleanup: don't mess with globals in tests without resetting them
Changing globals in the init() function of a test file is a bad idea, as it
affects all other tests that run after it. Do it explicitly in each test
function that needs it, and take care of restoring the previous value
afterwards.
2024-03-29 10:55:33 +01:00
Stefan Haller
1cedfa463b
Fix schema link in Config.md (#3451)
The schema at https://json.schemastore.org/lazygit.json is broken and
doesn't work. It should actually be removed.
2024-03-28 13:31:28 +01:00
Stefan Haller
9b035aed67 Fix schema link in Config.md 2024-03-28 13:24:54 +01:00
Stefan Haller
ce9cdd8d78
Fix rewording signed commits when the log.showsignature git config is true (#3431)
- **PR Description**

For people who have the log.showsignature git config set to true, trying
to reword a signed commit would put the signature verification into the
subject field and the commit subject into the description field of the
commit message panel. Amending commits, adding co-authors to a commit,
and copying a commit message to the clipboard would all be broken in a
similar way.

Slightly related is #1911, but back then it was more about performance
than wrong behavior, it seems.

Fixes #3425.
2024-03-28 13:19:11 +01:00
Stefan Haller
f774b7eb5c Fix rewording signed commits when the log.showsignature git config is true
For people who have the log.showsignature git config set to true, trying to
reword a signed commit would put the signature verification into the subject
field and the commit subject into the description field of the commit message
panel. Amending commits, adding co-authors to a commit, and copying a commit
message to the clipboard would all be broken in a similar way.
2024-03-28 13:16:10 +01:00
Stefan Haller
e4b4b6d5f4
Fix excluding files in submodules or worktrees (#3432)
- **PR Description**

Make the "Add to .git/info/exclude" command work correctly in a worktree
or in a submodule. Previously it would result in an error message.

Fixes #3427.
2024-03-28 13:13:52 +01:00
Stefan Haller
93251db67e Fix the "Add to .git/info/exclude" command in submodules or worktrees 2024-03-28 13:11:08 +01:00
Stefan Haller
de52a68b53 Add a test that demonstrates the problem
Using the "Add to .git/info/exclude" in a worktree results in an error message,
as the test shows. The same would happen in a submodule, but I'm not adding an
extra test for that, as the circumstances are the same.
2024-03-28 13:11:08 +01:00
Stefan Haller
42ebf1947a Cleanup: simplify return statements 2024-03-28 13:11:08 +01:00
Stefan Haller
c995e7ef2e Cleanup: remove pointless condition and error message
The file .git/info/exclude can't possibly show up in the files panel.
2024-03-28 13:11:08 +01:00
Stefan Haller
04fcb78c0c
Keep the same commit selected when exiting filtering mode (#3416)
- **PR Description**

When exiting filtering mode, we currently keep the selection index the
same in the commits panel. This doesn't make sense at all, since the
index in the filtered view has no relation to the index in the
unfiltered view.

I often use filtering mode (either by path or by author) to find a given
commit faster than I would otherwise be able to. When exiting filtering
mode, it's useful to keep the same commit selected, so that I can look
at the surrounding commits, see which branch it was a part of, etc. So
reselect the commit again after exiting filtering mode.

Sometimes this is not possible, most likely when the commit is so long
ago that it's outside of the initial 300 range. In that case, at least
select the commit again that was selected before I entered filtering;
this is still better than arbitrarily keeping the same selection index.
2024-03-28 12:27:02 +01:00
Stefan Haller
bd8518355e Keep the same commit selected when exiting filtering mode
When exiting filtering mode, we currently keep the selection index the same in
the commits panel. This doesn't make sense at all, since the index in the
filtered view has no relation to the index in the unfiltered view.

I often use filtering mode (either by path or by author) to find a given commit
faster than I would otherwise be able to. When exiting filtering mode, it's
useful to keep the same commit selected, so that I can look at the surrounding
commits, see which branch it was a part of, etc. So reselect the commit again
after exiting filtering mode.

Sometimes this is not possible, most likely when the commit is so long ago that
it's outside of the initial 300 range. In that case, at least select the commit
again that was selected before I entered filtering; this is still better than
arbitrarily keeping the same selection index.
2024-03-28 12:23:46 +01:00
Stefan Haller
f93cb54b5d
Fix crash when filtering the keybindings menu (#3450)
- **PR Description**

It would crash when some keybindings are set to null, and the filter
string is such that only those keybindings remain visible.

Fixes #3449.
2024-03-28 12:19:06 +01:00
Stefan Haller
0b70dfbf46 Fix crash when filtering the keybindings menu
It would crash when some keybindings are set to null, and the filter string is
such that only those keybindings remain visible.

The reason for the crash is that when inserting non-model items (menu section
headers in this case) you specify a column to align them to. This works on the
assumption that the number of columns is always the same. It can cope with the
case that columns are removed because they are empty for all items; but it can't
cope with the case that the getDisplayStrings function returns a lower number of
columns.

And this is what happened here: MenuViewModel.GetDisplayStrings would omit the
keybinding column when none of the entries have a keybinding. This logic is
unnecessary, the generic list rendering mechanism takes care of this, so
removing this logic fixes the crash.

We do have to make sure though that the column is really empty when there's no
keybinding, so change the logic to use FgCyan only when there's a keybinding.
2024-03-28 09:58:45 +01:00
Stefan Haller
38876ba141
Update Busy.md (#3433)
- **PR Description**
enqueing -> enqueueing
2024-03-26 23:12:49 +01:00
Ikko Eltociear Ashimine
57786fbb1f Update Busy.md
enqueing -> enqueueing
2024-03-26 23:08:51 +01:00
Stefan Haller
e295ccefab
Fix deleting update ref todos (#3439)
- **PR Description**

Deleting an update-ref todo in an interactive rebase now behaves as
expected (i.e. it leaves the branch referenced by the update-ref
untouched). Previously it would have deleted the branch referenced by
the update-ref todo when the rebase was continued. See #3418 for more
details.

Fixes #3418.
2024-03-26 22:43:46 +01:00