fix(git): prefer the upstream remote over a tracked origin when finding the repository (follow gh)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 18:59:04 +02:00
1 parent 2a221d0a81
commit 517d164d8a
3 files changed
+16 -8

No files matched your search

+5 -3
View File
@@ -292,9 +292,11 @@ func helpTopics(globals *pflag.FlagSet) []*cobra.Command {
` + indent(flagUsages(flags)) + `
tea selects the repository from --repo, TEA_REPO, git config tea.repository or a
Git remote (--remote, else the current branch's remote, upstream or origin, skipping
remotes on instances without an account, or not on --host or the GITEA_TOKEN instance),
tea selects the repository from --repo, TEA_REPO, git config tea.repository (tea repo
set-default) or a Git remote (--remote, else the base remote pr checkout recorded, the
current branch's remote, upstream or origin, skipping remotes on instances without an
account, or not on --host or the GITEA_TOKEN instance). Like gh, a clone with upstream
and origin targets upstream: a branch tracking origin does not select the fork,
and the instance from the repository URL, --host, TEA_HOST or GITEA_INSTANCE_URL,
default_host, or the only configured instance.