libgit2 / libgit2/libgit2sharp
two issues about config remote
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Repository.Init and repo.Network.Remotes.Add calls shown in the issue, then inspect the remote configuration-writing path and related API. Reproduce the generated config and determine how remote sections are serialized; done means the duplicate-section behavior is addressed and the requested mirror configuration question has a defined API outcome.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100