Commit Graph
23 Commits
Author SHA1 Message Date
Chris McDonnellandStefan Haller 265557afa2 Add unambigious refs/ prefix to all stash references
Pretty basic fix, didn't seem to have any complications.
I only added the refs/ prefix to the FullRefName() method
to align with other similar methods, and to make this change
not impact any user facing modals.

Fixes: https://github.com/jesseduffield/lazygit/issues/4634

Also adds a test demonstrating that the stash show behavior is now fixed
2025-06-15 16:14:59 +02:00
Chris McDonnellandStefan Haller 706891e92b Add integration test for resetting to upstream branch with duplicate name 2025-06-04 20:43:01 +02:00
Chris McDonnellandStefan Haller fa238809ae Use full refname instead of short to prevent disambiguation with tag
In the unlikely scenario that you have a remote branch on `origin` called
`foo`, and a local tag called `origin/foo`, git changes the behavior of
the previous command such that it produces

```
$ git for-each-ref --sort=refname --format=%(refname:short) refs/remotes

origin/branch1
remotes/origin/foo
```

with `remotes/` prepended. Presumably this is to disambiguate it from
the local tag `origin/foo`. Unfortunately, this breaks the existing
behavior of this function, so the remote branch is never shown.

By changing the command, we now get
```
$ git for-each-ref --sort=refname --format=%(refname) refs/remotes

refs/remotes/origin/branch1
refs/remotes/origin/foo
```

This allows easy parsing based on the `/`, and none of the code outside
this function has to change.

----

We previously were not showing remote HEADs for modern git versions
based on how they were formatted from "%(refname:short)".
We have decided that this is a feature, not a bug, so we are building
that into the code here.
2025-06-04 20:43:01 +02:00
Chris McDonnellandStefan Haller 737a99b1c8 Add integration tests showing resetting to duplicate named tags and branches 2025-06-04 20:43:01 +02:00
Chris McDonnellandStefan Haller 122d6e5f0d Add FullRefName to all reset menus 2025-06-04 20:43:01 +02:00
Chris McDonnellandStefan Haller e67bc45d48 Split behavior of rendering allBranchesLogCmd and switching to next cmd
This now allows for leaving the status panel and returning back to the
same log command. Previously any return to the status panel would result
in the next command in the list being shown. Now, you need to press `a`,
with a log command being rendered, to rotate to the next
allBranchesLogCmd.
2025-05-21 08:17:09 +02:00
Chris McDonnellandStefan Haller 3bd8a923ee Clear preserved commit message when entering CommitEditorPanel 2025-05-15 18:37:56 +02:00
Chris McDonnellandStefan Haller 47f1d847f1 Rename OnCommitSuccess to ClearPreservedCommitMessage
In one case it was actually called *before* making a commit (when switching from
the commit message panel to committing in the editor). And clearing the
preserved message is the only thing it does, so name it after what it does
rather than when it's called.
2025-05-15 18:37:56 +02:00
Chris McDonnellandStefan Haller 04bacbf9ce Remove the if statement from OnCommitSuccess
Previously it would only clear the message if the panel had been opened with
preserveMessage=true; we don't need this check, because callers know how they
opened the panel, and whether they want to clear the message.
2025-05-15 18:35:55 +02:00
Chris McDonnellandStefan Haller 26e58b8def Remove the call to OnCommitSuccess from tag creation
This is no change in behavior because OnCommitSuccess only clears the message
when the commit message panel was opened with preserveMessage=true, which it
isn't in the case of creating a tag.

And this is in fact the desired behavior, because we don't want creating a tag
to interfere with preserving commit messages in any way.
2025-05-15 18:33:40 +02:00
Chris McDonnell 1028f8efb8 Migrate deprecated AllBranchesLogCmd to AllBranchesLogCmds
This solves https://github.com/jesseduffield/lazygit/issues/3961 because
we no longer have a combination of the default and the user defined
list. We just have the user defined list.
2025-05-06 23:33:17 -04:00
Chris McDonnellandStefan Haller 8d47928c94 Update kidpix link in README to active url 2025-04-08 13:51:22 +02:00
Chris McDonnellandStefan Haller c06d4e7b18 fix: Make tag operation use GPG helper to run signing in sub-process 2025-03-24 08:41:58 +01:00
Chris McDonnellandStefan Haller f779a5878d refactor: Express WithGpgHelper with a config key parameter 2025-03-24 08:41:58 +01:00
Chris McDonnellandStefan Haller 6fb3b7430c refactor: Make commit.gpgSign match official capitalization
The actual usage is case insensitive, so this doesn't actually matter.
But if fills my heart with joy.

The test is case sensitive, but the actual response to `git config
commit.gpgSign` is equivalent to `git config commit.gppsign`
2025-03-24 08:41:58 +01:00
Chris McDonnellandStefan Haller 52da806c57 refactor: Rename UsingGpg to make room for Gpg Tag logic 2025-03-24 08:41:58 +01:00
Chris McDonnellandJesse Duffield c1ca1c8f99 URL encode gitlab brackets to make consistent with branch names
Some operating systems 'open' implementations do not like
when some special characters are unencoded, so they will
double-enconde the branch name, which we already encode.

This particularly matters since branch names with / are common
2025-03-12 09:04:04 +11:00
Chris McDonnell d39f883b4e Migrate to only doing marshalling twice, and compare via deep copy 2025-02-27 17:05:31 -05:00
Chris McDonnell a01ca19bb3 Set up benchmark on migration 2025-02-27 12:38:21 -05:00
Chris McDonnellandJesse Duffield 9d0740427e Change side panel width calculation to work for larger numbers
This technically is a breaking change for some existing numbers,
but it stays the same for default case, and isn't much different for
others
2025-02-24 07:36:47 +11:00
Chris McDonnellandStefan Haller 72b9e8328d Make commit prefixes migration only return true if it enters if statement 2025-02-23 19:01:03 +01:00
Chris McDonnellandStefan Haller 0ef3832e59 docs: Add reference to confirmation key to intro message 2025-02-23 08:44:48 +01:00
Chris McDonnellandStefan Haller b766ff9c83 Disable global keybinds while popups are active 2025-02-23 08:44:48 +01:00