Cannot fetch unless a remote is defined
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 408
- 平均合并
- 2 天 57 分钟
- 30 天内合并 PR
- 7
描述
Hi,
Thank you for pygit2! I'm using it extensively for git tooling in Ubuntu, but occasionally I find some corner where a feature doesn't exist and I have to resort to calling a git subprocess.
The git CLI allows me to use git fetch without having a remote defined. I can just specify a URL. I can't find any documentation on this in pygit2 though. It looks like I have to define a remote, with a name, first. Since I don't necessarily own the repository, this requires an ugly workaround because I have to be concerned about name collisions, crashing without having removed a temporary remote, etc.
Any chance of adding API functionality to fetch (and presumably) push against remotes with just a URL and no mandatory repository configuration please?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 pygit2 现有的远程定义以及 fetch/push 入口,同时对照 issue 中描述的 git CLI 行为。确定如何在不创建具名远程的情况下仅使用 URL 执行 fetch 和 push,然后通过针对性测试验证该行为;当这两个操作都能接受 URL 而无需仓库配置时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, python
- 领域
- api
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100