New-session branch picker only enumerates the 'origin' remote; repos with other remote names show only the default branch
- 主要语言
- 没有语言数据
- 星标
- 2.1k
- 派生
- 153
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Summary
When creating a new session for a multi-repo collection project, the branch picker only enumerates branches for repos whose remote is named `origin`. Repos that use a differently-named remote (e.g. `github`) fall back to showing only the default branch (`main`), and their `repo_full_name` is reported as `unknown`.
### Repro
Collection project with two member repos:
- `frontend` — remote named `origin` -> all branches are listed in the new-session branch picker.
- `backend` — remote named `github` (same GitHub URL, just a different remote name) -> only `main` is selectable, and the repo shows up as `repo_full_name: unknown`.
Both remotes point at valid GitHub repos:
```
origin https://github.com/Org/frontend.git
github https://github.com/Org/backend.git
```
### Expected
Branch enumeration and repo resolution should work regardless of the remote name. The app should inspect all configured remotes (or at least the one backing the tracked/default branch) rather than hard-coding a lookup for `origin`.
### Actual
Only the `origin` remote is consulted. Repos without an `origin` remote are limited to the default branch and are labeled `unknown`.
### Workaround
Add or rename the remote to `origin`:
```
git remote rename github origin
```
After this, the new-session branch picker lists all branches for that repo.
贡献指南
调研方向
从新会话分支选择器开始,追踪它如何发现远程仓库并解析 repo_full_name。使用远程仓库名为 github 的仓库进行复现,然后验证所有分支都会被列出,并且无需重命名远程仓库,该仓库不再显示为未知。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, github
- 领域
- desktop
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 58/100