jesseduffield.lazygit/pkg/commands
Chris McDonnell 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
..
git_commands Use full refname instead of short to prevent disambiguation with tag 2025-06-04 20:43:01 +02:00
git_config Drop the git config cache when getting focus 2025-03-20 11:50:28 +01:00
hosting_service URL encode gitlab brackets to make consistent with branch names 2025-03-12 09:04:04 +11:00
models Store fromHash/toHash in Pipe struct as pointers 2025-04-29 14:57:15 +02:00
oscommands Kill background fetch when it requests a passphrase 2025-05-29 14:36:01 +02:00
patch Remove utils.Clamp, use lo.Clamp instead 2025-04-21 18:03:18 +02:00
testdata Support opening lazygit in a submodule 2019-05-12 17:59:49 +10:00
git.go Use WorkingTreeState instead of RebaseMode in CommitLoader 2025-04-20 15:53:17 +02:00
git_cmd_obj_builder.go Remove ICmdObj interface 2025-05-01 15:21:37 +02:00
git_cmd_obj_runner.go Remove ICmdObj interface 2025-05-01 15:21:37 +02:00