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