Setting tracking branch fails with "ref 'refs/remotes/origin/master' doesn't match the destination"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với test đang thất bại CanSetTrackedBranch_MultipleFetchSpecs trong LibGit2Sharp.Tests/BranchFixture.cs. Truy vết BranchUpdater.GetUpstreamInformation và Remote.FetchSpecTransformToSource bằng các fetch specification chồng lấn trong bản tái hiện. Issue được hoàn tất khi việc thiết lập tracked branch thành công và regression test vượt qua trong các kịch bản đã nêu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Reproduction steps
- a repo with multiple overlapping fetch specs:
[remote "origin"]
url = ../multifetchspec_testrepo.git/
fetch = +refs/pull/28/head:refs/remotes/origin/PR-28
fetch = +refs/heads/master:refs/remotes/origin/master
fetch = +refs/heads/*:refs/remotes/origin/*
- repo doesn't have local
masterbranch (but remote does) - call
repo.Branches.Update("master", b => b.TrackedBranch = trackedBranch.CanonicalName);(withtrackedBranchpointing torefs/remotes/origin/master).
Expected behavior
Tracking branch gets set.
Actual behavior
Exception:
LibGit2Sharp.LibGit2SharpException: ref 'refs/remotes/origin/master' doesn't match the destination
LibGit2Sharp.LibGit2SharpException
ref 'refs/remotes/origin/master' doesn't match the destination
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in D:\Develop\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 154
at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in D:\Develop\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 172
at LibGit2Sharp.Core.Proxy.git_refspec_rtransform(IntPtr refSpecPtr, String name) in D:\Develop\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 2085
at LibGit2Sharp.Remote.FetchSpecTransformToSource(String reference) in D:\Develop\libgit2sharp\LibGit2Sharp\Remote.cs:line 138
at LibGit2Sharp.BranchUpdater.GetUpstreamInformation(String canonicalName, String& remoteName, String& mergeBranchName) in D:\Develop\libgit2sharp\LibGit2Sharp\BranchUpdater.cs:line 188
at LibGit2Sharp.BranchUpdater.SetUpstream(String upstreamBranchName) in D:\Develop\libgit2sharp\LibGit2Sharp\BranchUpdater.cs:line 116
at LibGit2Sharp.BranchUpdater.set_TrackedBranch(String value) in D:\Develop\libgit2sharp\LibGit2Sharp\BranchUpdater.cs:line 53
at LibGit2Sharp.Tests.BranchFixture.<>c__DisplayClass43_0.<CanSetTrackedBranch_MultipleFetchSpecs>b__0(BranchUpdater b) in D:\Develop\libgit2sharp\LibGit2Sharp.Tests\BranchFixture.cs:line 898
at LibGit2Sharp.BranchCollection.Update(Branch branch, Action`1[] actions) in D:\Develop\libgit2sharp\LibGit2Sharp\BranchCollection.cs:line 292
Version of LibGit2Sharp (release number or SHA1)
4de700fedf87a5c9de10b921a636cc2f21d8964d
Operating system(s) tested; .NET runtime tested
Windows 10, Ubuntu 18.04
- Ngôn ngữ chính
- C#
- Star
- 3.5k
- Fork
- 925
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của libgit2/libgit2sharp
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
libgit2/libgit2sharp#2193 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
libgit2/libgit2sharp#2192 · 1 bình luận ·
-
Website is down Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
libgit2/libgit2sharp#2191 · 2 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
libgit2/libgit2sharp#2189 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
libgit2/libgit2sharp#2187 · 2 bình luận ·
Tất cả issue của libgit2/libgit2sharp
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
azurenoops/spin_agent#975 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15108 · 1 bình luận ·