fix(repo): +tree 未指定 --ref 时遵循仓库默认分支(修复 main 默认分支仓库 404) #337
Loading…
Reference in New Issue
No description provided.
Delete Branch "Taoyouce/gitlink-cli:fix/repo-tree-default-branch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
repo +tree未指定--ref时把 ref 硬编码为master,对默认分支是main(或其他名称)的仓库直接返回[-2] 你访问的文件不存在(生产实测datawhalechina/paper-chart-tutorial,默认分支main)。平台sub_entriesAPI 在不带ref参数时会自动使用仓库默认分支。变更
--ref未指定时不再发送ref参数(交由平台落到默认分支),flag 不再声明master默认值doc/changes/repo-tree-default-branch.md验证
go test ./shortcuts/repo//go vet/ gofmt 全绿main(datawhalechina/paper-chart-tutorial)与master(gitlink/gitlink-cli)的仓库均正常列出根目录