libgit2 / libgit2/libgit2sharp
two issues about config remote
未关闭
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 3.5k
- 派生
- 925
- PR 合并指标
- 30 天内没有已合并 PR
描述
Q1: Hereafter code produce two remote sections in the git config file.
Console.WriteLine(GlobalSettings.Version); //{0.22.0-8daef23-785d8c4 (x86 - Threads, Https)}
using (var repo = new Repository(Repository.Init(".\\test.git", true)))
{
repo.Network.Remotes.Add("origin", @"https://github.com/libgit2/libgit2sharp.git");
}
var config = File.ReadAllText(@".\\test.git\\config");
Console.Write(config);
/*
[remote "origin"]
url = https://github.com/libgit2/libgit2sharp.git
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
*/
Q2: How to set a remote as mirror. I think there are no API consider about this.
[remote "origin"]
url = https://github.com/libgit2/libgit2sharp.git
fetch = +refs/*:refs/*
mirror = true
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中所示的 Repository.Init 和 repo.Network.Remotes.Add 调用开始,然后检查远程配置写入路径及相关 API。复现生成的 config,并确定远程 section 的序列化方式;当重复 section 的行为得到处理,并且所请求的 mirror 配置问题有明确的 API 结果时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, git
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100