10000 Update libgit2 to e0383fa · UiPath/libgit2sharp@369bb76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 369bb76

Browse files
Edward Thomsonnulltoken
authored andcommitted
Update libgit2 to e0383fa
1 parent cf7c5e5 commit 369bb76

17 files changed

+81
-38
lines changed
-920 KB
Binary file not shown.
-5.29 MB
Binary file not shown.
944 KB
Binary file not shown.
5.33 MB
Binary file not shown.
-702 KB
Binary file not shown.
718 KB
Binary file not shown.

LibGit2Sharp.Tests/FilterBranchFixture.cs

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ public void CanRewriteParents()
609609
// Graft the orphan "test" branch to the tip of "packed"
610610
//
611611
// Before:
612-
// * e90810b (test, lw, e90810b, test)
612+
// * e90810b (test, tag: lw, tag: e90810b, tag: test)
613613
// |
614614
// * 6dcf9bf
615615
// <------------------ note: no connection
@@ -619,7 +619,7 @@ public void CanRewriteParents()
619619
//
620620
// ... and after:
621621
//
622-
// * f558880 (test, lw, e90810b, test)
622+
// * f558880 (test, tag: lw, tag: e90810b, tag: test)
623623
// |
624624
// * 0c25efa
625625
// | <------------------ add this link
@@ -630,29 +630,40 @@ public void CanRewriteParents()
630630
public void CanRewriteParentWithRewrittenCommit()
631631
{
632632
var commitToRewrite = repo.Lookup<Commit>("6dcf9bf");
633-
var newParent = repo.Lookup<Commit>("41bc8c6");
633+
var newParent = repo.Branches["packed"].Tip;
634+
635+
Assert.True(newParent.Sha.StartsWith("41bc8c6"));
634636

635637
repo.Refs.RewriteHistory(new RewriteHistoryOptions
636638
{
637639
OnError = OnError,
638640
OnSucceeding = OnSucceeding,
639-
CommitHeaderRewriter =
640-
c =>
641-
c.Id != newParent.Id
642-
? null
643-
: CommitRewriteInfo.From(c, message: "changed"),
644641
CommitParentsRewriter =
645642
c =>
646643
c.Id != commitToRewrite.Id
647644
? c.Parents
648645
: new[] { newParent }
649-
}, commitToRewrite, newParent);
646+
}, commitToRewrite);
650647

651648
AssertSucceedingButNotError();
652649

653-
var rewrittenParent = repo.Lookup<Commit>("refs/heads/test~").Parents.Single();
654-
Assert.Equal(newParent.Tree, rewrittenParent.Tree);
655-
Assert.NotEqual(newParent, rewrittenParent);
650+
// Assert "packed" hasn't been rewritten
651+
Assert.True(repo.Branches["packed"].Tip.Sha.StartsWith("41bc8c6"));
652+
653+
// Assert (test, tag: lw, tag: e90810b, tag: test) have been rewritten
654+
var rewrittenTestCommit = repo.Branches["test"].Tip;
655+
Assert.True(rewrittenTestCommit.Sha.StartsWith("f558880"));
656+
Assert.Equal(rewrittenTestCommit, repo.Lookup<Commit>("refs/tags/lw^{commit}"));
657+
Assert.Equal(rewrittenTestCommit, repo.Lookup<Commit>("refs/tags/e90810b^{commit}"));
658+
Assert.Equal(rewrittenTestCommit, repo.Lookup<Commit>("refs/tags/test^{commit}"));
659+
660+
// Assert parent of rewritten commit
661+
var rewrittenTestCommitParent = rewrittenTestCommit.Parents.Single();
662+
Assert.True(rewrittenTestCommitParent.Sha.StartsWith("0c25efa"));
663+
664+
// Assert grand parent of rewritten commit
665+
var rewrittenTestCommitGrandParent = rewrittenTestCommitParent.Parents.Single();
666+
Assert.True(rewrittenTestCommitGrandParent.Sha.StartsWith("41bc8c6"));
656667
}
657668

658669
[Fact]

LibGit2Sharp/Core/GitRemoteCallbacks.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ internal struct GitRemoteCallbacks
1717

1818
internal NativeMethods.git_cred_acquire_cb acquire_credentials;
1919

20+
internal IntPtr certificate_check;
21+
2022
internal NativeMethods.git_transfer_progress_callback download_progress;
2123

2224
internal NativeMethods.remote_update_tips_callback update_tips;

LibGit2Sharp/Core/NativeDllName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ namespace LibGit2Sharp.Core
22
{
33
internal static class NativeDllName
44
{
5-
public const string Name = "git2-69db893";
5+
public const string Name = "git2-e0383fa";
66
}
77
}

0 commit comments

Comments
 (0)
0