diff --git a/CHANGES.md b/CHANGES.md index b26dac602..9dee434dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,37 @@ - CodeBetter TeamCity: - Travis: +## v0.19 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.18.1...v0.19)) + +### Additions + + - Introduce repo.Network.Remotes.Rename() (#730, #741) + - Introduce repo.ObjectDatabase.ShortenObjectId() (#677) + - Introduce Remote.IsSupportedUrl() (#754) + - Introduce repo.CherryPick() (#755, #756) + - Expose advanced conflict data (REUC, renames) (#748) + +### Changes + + - Make Patch expose a richer PatchEntryChanges type (#686, #702) + - Make network operations accept Credentials through a callback (#759, #761, #767) + - Make repo.Index.Stage() respect ignored files by default (#777) + - Make OdbBackend IDisposable (#713) + - Update libgit2 binaries to libgit2/libgit2@d28b2b7 + +### Fixes + + - Don't require specific rights to the parent hierarchy of a repository (#795) + - Prevent Clone() from choking on empty packets (#794) + - Ensure Tags can be created in detached Head state (#791) + - Properly determine object size when calculating its CRC (#783) + - Prevent blind fast forwards merges when there are checkout conflicts (#781) + - Make repo.Reset() and repo.Index.Unstage() cope with renamed entries (#777) + - Do not throw when parsing annotated tags without a Signature (#775, #776) + - Remove conflicts upon repo.Index.Remove() call (#768) + - Honor the merge.ff configuration entry (#709) + - Make Clone() properly throws when passed an invalid url (#701) + ## v0.18.1 - ([diff](https://github.com/libgit2/libgit2sharp/compare/v0.18.0...v0.18.1)) ### Additions diff --git a/CI/travis.osx.install.deps.sh b/CI/travis.osx.install.deps.sh index 19e7552a4..51082f15a 100755 --- a/CI/travis.osx.install.deps.sh +++ b/CI/travis.osx.install.deps.sh @@ -4,7 +4,7 @@ set -ev MONO_VER=2.10.10 brew update -brew install cmake +which cmake || brew install cmake wget "http://download.mono-project.com/archive/${MONO_VER}/macos-10-x86/MonoFramework-MDK-${MONO_VER}.macos10.xamarin.x86.dmg" hdid "MonoFramework-MDK-${MONO_VER}.macos10.xamarin.x86.dmg" diff --git a/Lib/NativeBinaries/amd64/git2-69db893.dll b/Lib/NativeBinaries/amd64/git2-69db893.dll new file mode 100644 index 000000000..1b4395446 Binary files /dev/null and b/Lib/NativeBinaries/amd64/git2-69db893.dll differ diff --git a/Lib/NativeBinaries/amd64/git2-90befde.pdb b/Lib/NativeBinaries/amd64/git2-69db893.pdb similarity index 50% rename from Lib/NativeBinaries/amd64/git2-90befde.pdb rename to Lib/NativeBinaries/amd64/git2-69db893.pdb index bc9fb2269..7ac433959 100644 Binary files a/Lib/NativeBinaries/amd64/git2-90befde.pdb and b/Lib/NativeBinaries/amd64/git2-69db893.pdb differ diff --git a/Lib/NativeBinaries/amd64/git2-90befde.dll b/Lib/NativeBinaries/amd64/git2-90befde.dll deleted file mode 100644 index 5af4cbce4..000000000 Binary files a/Lib/NativeBinaries/amd64/git2-90befde.dll and /dev/null differ diff --git a/Lib/NativeBinaries/x86/git2-69db893.dll b/Lib/NativeBinaries/x86/git2-69db893.dll new file mode 100644 index 000000000..4295b98eb Binary files /dev/null and b/Lib/NativeBinaries/x86/git2-69db893.dll differ diff --git a/Lib/NativeBinaries/x86/git2-90befde.pdb b/Lib/NativeBinaries/x86/git2-69db893.pdb similarity index 52% rename from Lib/NativeBinaries/x86/git2-90befde.pdb rename to Lib/NativeBinaries/x86/git2-69db893.pdb index 8a6ab03aa..1a4fcf5c7 100644 Binary files a/Lib/NativeBinaries/x86/git2-90befde.pdb and b/Lib/NativeBinaries/x86/git2-69db893.pdb differ diff --git a/Lib/NativeBinaries/x86/git2-90befde.dll b/Lib/NativeBinaries/x86/git2-90befde.dll deleted file mode 100644 index 086bfda98..000000000 Binary files a/Lib/NativeBinaries/x86/git2-90befde.dll and /dev/null differ diff --git a/LibGit2Sharp.Tests/CherryPickFixture.cs b/LibGit2Sharp.Tests/CherryPickFixture.cs new file mode 100644 index 000000000..8ce6b04a0 --- /dev/null +++ b/LibGit2Sharp.Tests/CherryPickFixture.cs @@ -0,0 +1,141 @@ +using System.IO; +using System.Linq; +using LibGit2Sharp.Tests.TestHelpers; +using Xunit; +using Xunit.Extensions; +using System; + +namespace LibGit2Sharp.Tests +{ + public class CherryPickFixture : BaseFixture + { + [Theory] + [InlineData(true)] + [InlineData(false)] + public void CanCherryPick(bool fromDetachedHead) + { + string path = CloneMergeTestRepo(); + using (var repo = new Repository(path)) + { + if (fromDetachedHead) + { + repo.Checkout(repo.Head.Tip.Id.Sha); + } + + Commit commitToMerge = repo.Branches["fast_forward"].Tip; + + CherryPickResult result = repo.CherryPick(commitToMerge, Constants.Signature); + + Assert.Equal(CherryPickStatus.CherryPicked, result.Status); + Assert.Equal(cherryPickedCommitId, result.Commit.Id.Sha); + Assert.False(repo.Index.RetrieveStatus().Any()); + Assert.Equal(fromDetachedHead, repo.Info.IsHeadDetached); + Assert.Equal(commitToMerge.Author, result.Commit.Author); + Assert.Equal(Constants.Signature, result.Commit.Committer); + } + } + + [Fact] + public void CherryPickWithConflictDoesNotCommit() + { + const string firstBranchFileName = "first branch file.txt"; + const string secondBranchFileName = "second branch file.txt"; + const string sharedBranchFileName = "first+second branch file.txt"; + + string path = CloneStandardTestRepo(); + using (var repo = new Repository(path)) + { + var firstBranch = repo.CreateBranch("FirstBranch"); + firstBranch.Checkout(); + + // Commit with ONE new file to both first & second branch (SecondBranch is created on this commit). + AddFileCommitToRepo(repo, sharedBranchFileName); + + var secondBranch = repo.CreateBranch("SecondBranch"); + // Commit with ONE new file to first branch (FirstBranch moves forward as it is checked out, SecondBranch stays back one). + AddFileCommitToRepo(repo, firstBranchFileName); + AddFileCommitToRepo(repo, sharedBranchFileName, "The first branches comment"); // Change file in first branch + + secondBranch.Checkout(); + // Commit with ONE new file to second branch (FirstBranch and SecondBranch now point to separate commits that both have the same parent commit). + AddFileCommitToRepo(repo, secondBranchFileName); + AddFileCommitToRepo(repo, sharedBranchFileName, "The second branches comment"); // Change file in second branch + + CherryPickResult cherryPickResult = repo.CherryPick(repo.Branches["FirstBranch"].Tip, Constants.Signature); + + Assert.Equal(CherryPickStatus.Conflicts, cherryPickResult.Status); + + Assert.Null(cherryPickResult.Commit); + Assert.Equal(1, repo.Index.Conflicts.Count()); + + var conflict = repo.Index.Conflicts.First(); + var changes = repo.Diff.Compare(repo.Lookup(conflict.Theirs.Id), repo.Lookup(conflict.Ours.Id)); + + Assert.False(changes.IsBinaryComparison); + } + } + + [Theory] + [InlineData(CheckoutFileConflictStrategy.Ours)] + [InlineData(CheckoutFileConflictStrategy.Theirs)] + public void CanSpecifyConflictFileStrategy(CheckoutFileConflictStrategy conflictStrategy) + { + const string conflictFile = "a.txt"; + const string conflictBranchName = "conflicts"; + + string path = CloneMergeTestRepo(); + using (var repo = new Repository(path)) + { + Branch branch = repo.Branches[conflictBranchName]; + Assert.NotNull(branch); + + CherryPickOptions cherryPickOptions = new CherryPickOptions() + { + FileConflictStrategy = conflictStrategy, + }; + + CherryPickResult result = repo.CherryPick(branch.Tip, Constants.Signature, cherryPickOptions); + Assert.Equal(CherryPickStatus.Conflicts, result.Status); + + // Get the information on the conflict. + Conflict conflict = repo.Index.Conflicts[conflictFile]; + + Assert.NotNull(conflict); + Assert.NotNull(conflict.Theirs); + Assert.NotNull(conflict.Ours); + + // Get the blob containing the expected content. + Blob expectedBlob = null; + switch (conflictStrategy) + { + case CheckoutFileConflictStrategy.Theirs: + expectedBlob = repo.Lookup(conflict.Theirs.Id); + break; + case CheckoutFileConflictStrategy.Ours: + expectedBlob = repo.Lookup(conflict.Ours.Id); + break; + default: + throw new Exception("Unexpected FileConflictStrategy"); + } + + Assert.NotNull(expectedBlob); + + // Check the content of the file on disk matches what is expected. + string expectedContent = expectedBlob.GetContentText(new FilteringOptions(conflictFile)); + Assert.Equal(expectedContent, File.ReadAllText(Path.Combine(repo.Info.WorkingDirectory, conflictFile))); + } + } + + private Commit AddFileCommitToRepo(IRepository repository, string filename, string content = null) + { + Touch(repository.Info.WorkingDirectory, filename, content); + + repository.Index.Stage(filename); + + return repository.Commit("New commit", Constants.Signature, Constants.Signature); + } + + // Commit IDs of the checked in merge_testrepo + private const string cherryPickedCommitId = "74b37f366b6e1c682c1c9fe0c6b006cbe909cf91"; + } +} diff --git a/LibGit2Sharp.Tests/CloneFixture.cs b/LibGit2Sharp.Tests/CloneFixture.cs index f287cde5a..a3b35d8b3 100644 --- a/LibGit2Sharp.Tests/CloneFixture.cs +++ b/LibGit2Sharp.Tests/CloneFixture.cs @@ -151,7 +151,7 @@ public void CanCloneWithCredentials() string clonedRepoPath = Repository.Clone(Constants.PrivateRepoUrl, scd.DirectoryPath, new CloneOptions() { - Credentials = Constants.PrivateRepoCredentials + CredentialsProvider = Constants.PrivateRepoCredentials }); @@ -166,5 +166,38 @@ public void CanCloneWithCredentials() Assert.False(repo.Info.IsBare); } } + + [Theory] + [InlineData("https://libgit2@bitbucket.org/libgit2/testgitrepository.git", "libgit3", "libgit3")] + public void CanCloneFromBBWithCredentials(string url, string user, string pass) + { + var scd = BuildSelfCleaningDirectory(); + + string clonedRepoPath = Repository.Clone(url, scd.DirectoryPath, new CloneOptions() { + CredentialsProvider = (_url, _user, _cred) => new UsernamePasswordCredentials { + Username = user, + Password = pass, + } + }); + + using (var repo = new Repository(clonedRepoPath)) + { + string dir = repo.Info.Path; + Assert.True(Path.IsPathRooted(dir)); + Assert.True(Directory.Exists(dir)); + + Assert.NotNull(repo.Info.WorkingDirectory); + Assert.Equal(Path.Combine(scd.RootedDirectoryPath, ".git" + Path.DirectorySeparatorChar), repo.Info.Path); + Assert.False(repo.Info.IsBare); + } + } + + [Fact] + public void CloningAnUrlWithoutPathThrows() + { + var scd = BuildSelfCleaningDirectory(); + + Assert.Throws(() => Repository.Clone("http://github.com", scd.DirectoryPath)); + } } } diff --git a/LibGit2Sharp.Tests/ConfigurationFixture.cs b/LibGit2Sharp.Tests/ConfigurationFixture.cs index 0e7774617..ad085a5a0 100644 --- a/LibGit2Sharp.Tests/ConfigurationFixture.cs +++ b/LibGit2Sharp.Tests/ConfigurationFixture.cs @@ -80,30 +80,6 @@ public void CanUnsetAnEntryFromTheGlobalConfiguration() } } - [SkippableFact] - public void CanGetGlobalStringValue() - { - using (var repo = new Repository(StandardTestRepoPath)) - { - InconclusiveIf(() => !repo.Config.HasConfig(ConfigurationLevel.Global), - "No Git global configuration available"); - - Assert.NotNull(repo.Config.Get("user.name")); - } - } - - [SkippableFact] - public void CanGetGlobalStringValueWithoutRepo() - { - using (var config = new Configuration()) - { - InconclusiveIf(() => !config.HasConfig(ConfigurationLevel.Global), - "No Git global configuration available"); - - Assert.NotNull(config.Get("user.name")); - } - } - [Fact] public void CanReadBooleanValue() { @@ -264,54 +240,6 @@ public void CanSetBooleanValue() } } - [SkippableFact] - public void CanSetGlobalStringValue() - { - using (var repo = new Repository(StandardTestRepoPath)) - { - InconclusiveIf(() => !repo.Config.HasConfig(ConfigurationLevel.Global), - "No Git global configuration available"); - - var existing = repo.Config.Get("user.name"); - Assert.NotNull(existing); - - try - { - repo.Config.Set("user.name", "Unit Test", ConfigurationLevel.Global); - - AssertValueInGlobalConfigFile("name = Unit Test$"); - } - finally - { - repo.Config.Set("user.name", existing.Value, ConfigurationLevel.Global); - } - } - } - - [SkippableFact] - public void CanSetGlobalStringValueWithoutRepo() - { - using(var config = new Configuration()) - { - InconclusiveIf(() => !config.HasConfig(ConfigurationLevel.Global), - "No Git global configuration available"); - - var existing = config.Get("user.name"); - Assert.NotNull(existing); - - try - { - config.Set("user.name", "Unit Test", ConfigurationLevel.Global); - - AssertValueInGlobalConfigFile("name = Unit Test$"); - } - finally - { - config.Set("user.name", existing.Value, ConfigurationLevel.Global); - } - } - } - [Fact] public void SettingLocalConfigurationOutsideAReposThrows() { diff --git a/LibGit2Sharp.Tests/ConflictFixture.cs b/LibGit2Sharp.Tests/ConflictFixture.cs index deec945c6..9a98bd1b6 100644 --- a/LibGit2Sharp.Tests/ConflictFixture.cs +++ b/LibGit2Sharp.Tests/ConflictFixture.cs @@ -27,11 +27,32 @@ public static IEnumerable ConflictData } } + private static List RenameConflictData + { + get + { + return new List + { + new[] { "3a-renamed-in-ours-deleted-in-theirs.txt", "3a-newname-in-ours-deleted-in-theirs.txt", null }, + new[] { "3b-renamed-in-theirs-deleted-in-ours.txt", null, "3b-newname-in-theirs-deleted-in-ours.txt" }, + new[] { "4a-renamed-in-ours-added-in-theirs.txt", "4a-newname-in-ours-added-in-theirs.txt", null }, + new[] { "4b-renamed-in-theirs-added-in-ours.txt", null, "4b-newname-in-theirs-added-in-ours.txt" }, + new[] { "5a-renamed-in-ours-added-in-theirs.txt", "5a-newname-in-ours-added-in-theirs.txt", "5a-renamed-in-ours-added-in-theirs.txt" }, + new[] { "5b-renamed-in-theirs-added-in-ours.txt", "5b-renamed-in-theirs-added-in-ours.txt", "5b-newname-in-theirs-added-in-ours.txt" }, + new[] { "6-both-renamed-1-to-2.txt", "6-both-renamed-1-to-2-ours.txt", "6-both-renamed-1-to-2-theirs.txt" }, + new[] { "7-both-renamed-side-1.txt", "7-both-renamed.txt", "7-both-renamed-side-1.txt" }, + new[] { "7-both-renamed-side-2.txt", "7-both-renamed-side-2.txt", "7-both-renamed.txt" }, + }; + } + } + [Theory] [InlineData(true, "ancestor-and-ours.txt", true, false, FileStatus.Removed, 2)] [InlineData(false, "ancestor-and-ours.txt", true, true, FileStatus.Removed |FileStatus.Untracked, 2)] [InlineData(true, "ancestor-and-theirs.txt", true, false, FileStatus.Nonexistent, 2)] [InlineData(false, "ancestor-and-theirs.txt", true, true, FileStatus.Untracked, 2)] + [InlineData(true, "ancestor-only.txt", false, false, FileStatus.Nonexistent, 1)] + [InlineData(false, "ancestor-only.txt", false, false, FileStatus.Nonexistent, 1)] [InlineData(true, "conflicts-one.txt", true, false, FileStatus.Removed, 3)] [InlineData(false, "conflicts-one.txt", true, true, FileStatus.Removed | FileStatus.Untracked, 3)] [InlineData(true, "conflicts-two.txt", true, false, FileStatus.Removed, 3)] @@ -42,14 +63,7 @@ public static IEnumerable ConflictData [InlineData(false, "ours-only.txt", true, true, FileStatus.Removed | FileStatus.Untracked, 1)] [InlineData(true, "theirs-only.txt", true, false, FileStatus.Nonexistent, 1)] [InlineData(false, "theirs-only.txt", true, true, FileStatus.Untracked, 1)] - /* Conflicts clearing through Index.Remove() only works when a version of the entry exists in the workdir. - * This is because libgit2's git_iterator_for_index() seem to only care about stage level 0. - * Corrolary: other cases only work out of sheer luck (however, the behaviour is stable, so I guess we - * can rely on it for the moment. - * [InlineData(true, "ancestor-only.txt", false, false, FileStatus.Nonexistent, 0)] - * [InlineData(false, "ancestor-only.txt", false, false, FileStatus.Nonexistent, 0)] - */ - public void CanClearConflictsByRemovingFromTheIndex( + public void CanResolveConflictsByRemovingFromTheIndex( bool removeFromWorkdir, string filename, bool existsBeforeRemove, bool existsAfterRemove, FileStatus lastStatus, int removedIndexEntries) { var path = CloneMergedTestRepo(); @@ -61,6 +75,7 @@ public void CanClearConflictsByRemovingFromTheIndex( Assert.Equal(existsBeforeRemove, File.Exists(fullpath)); Assert.NotNull(repo.Index.Conflicts[filename]); + Assert.Equal(0, repo.Index.Conflicts.ResolvedConflicts.Count()); repo.Index.Remove(filename, removeFromWorkdir); @@ -68,6 +83,32 @@ public void CanClearConflictsByRemovingFromTheIndex( Assert.Equal(count - removedIndexEntries, repo.Index.Count); Assert.Equal(existsAfterRemove, File.Exists(fullpath)); Assert.Equal(lastStatus, repo.Index.RetrieveStatus(filename)); + + Assert.Equal(1, repo.Index.Conflicts.ResolvedConflicts.Count()); + Assert.NotNull(repo.Index.Conflicts.ResolvedConflicts[filename]); + } + } + + [Fact] + public void CanGetOriginalNamesOfRenameConflicts() + { + var path = CloneMergeRenamesTestRepo(); + using (var repo = new Repository(path)) + { + var expected = RenameConflictData; + var actual = repo.Index.Conflicts.Names; + + Assert.Equal(expected.Count, actual.Count()); + + int i = 0; + foreach(var name in actual) + { + Assert.Equal(expected[i][0], name.Ancestor); + Assert.Equal(expected[i][1], name.Ours); + Assert.Equal(expected[i][2], name.Theirs); + + i++; + } } } diff --git a/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs b/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs index c1b0bcce6..ea230a037 100644 --- a/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs +++ b/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs @@ -290,12 +290,12 @@ public void DetectsTheExactRenamingOfFilesByDefault() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree); + var changes = repo.Diff.Compare(old.Tree, @new.Tree); Assert.Equal(1, changes.Count()); Assert.Equal(1, changes.Renamed.Count()); - Assert.Equal("original.txt", changes.Renamed.Single().OldPath); - Assert.Equal("renamed.txt", changes.Renamed.Single().Path); + Assert.Equal(originalPath, changes.Renamed.Single().OldPath); + Assert.Equal(renamedPath, changes.Renamed.Single().Path); } } @@ -337,7 +337,7 @@ public void RenameThresholdsAreObeyed() }; compareOptions.Similarity.RenameThreshold = 30; - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: compareOptions); + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: compareOptions); Assert.True(changes.All(x => x.Status == ChangeKind.Renamed)); compareOptions.Similarity.RenameThreshold = 90; @@ -366,7 +366,7 @@ public void ExactModeDetectsExactRenames() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { Similarity = SimilarityOptions.Exact, @@ -374,8 +374,8 @@ public void ExactModeDetectsExactRenames() Assert.Equal(1, changes.Count()); Assert.Equal(1, changes.Renamed.Count()); - Assert.Equal("original.txt", changes.Renamed.Single().OldPath); - Assert.Equal("renamed.txt", changes.Renamed.Single().Path); + Assert.Equal(originalPath, changes.Renamed.Single().OldPath); + Assert.Equal(renamedPath, changes.Renamed.Single().Path); } } @@ -400,7 +400,7 @@ public void ExactModeDetectsExactCopies() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { Similarity = SimilarityOptions.Exact, @@ -433,7 +433,7 @@ public void ExactModeDoesntDetectRenamesWithEdits() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { Similarity = SimilarityOptions.Exact, @@ -469,7 +469,7 @@ public void CanIncludeUnmodifiedEntriesWhenDetectingTheExactRenamingOfFilesWhenE Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { @@ -480,8 +480,8 @@ public void CanIncludeUnmodifiedEntriesWhenDetectingTheExactRenamingOfFilesWhenE Assert.Equal(2, changes.Count()); Assert.Equal(1, changes.Unmodified.Count()); Assert.Equal(1, changes.Copied.Count()); - Assert.Equal("original.txt", changes.Copied.Single().OldPath); - Assert.Equal("copied.txt", changes.Copied.Single().Path); + Assert.Equal(originalPath, changes.Copied.Single().OldPath); + Assert.Equal(copiedPath, changes.Copied.Single().Path); } } @@ -505,7 +505,7 @@ public void CanNotDetectTheExactRenamingFilesWhenNotEnabled() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { @@ -540,7 +540,7 @@ public void CanDetectTheExactCopyingOfNonModifiedFilesWhenEnabled() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { @@ -549,8 +549,8 @@ public void CanDetectTheExactCopyingOfNonModifiedFilesWhenEnabled() Assert.Equal(1, changes.Count()); Assert.Equal(1, changes.Copied.Count()); - Assert.Equal("original.txt", changes.Copied.Single().OldPath); - Assert.Equal("copied.txt", changes.Copied.Single().Path); + Assert.Equal(originalPath, changes.Copied.Single().OldPath); + Assert.Equal(copiedPath, changes.Copied.Single().Path); } } @@ -577,7 +577,7 @@ public void CanNotDetectTheExactCopyingOfNonModifiedFilesWhenNotEnabled() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree); + var changes = repo.Diff.Compare(old.Tree, @new.Tree); Assert.Equal(1, changes.Count()); Assert.Equal(0, changes.Copied.Count()); @@ -610,7 +610,7 @@ public void CanDetectTheExactCopyingOfModifiedFilesWhenEnabled() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { @@ -619,8 +619,8 @@ public void CanDetectTheExactCopyingOfModifiedFilesWhenEnabled() Assert.Equal(2, changes.Count()); Assert.Equal(1, changes.Copied.Count()); - Assert.Equal("original.txt", changes.Copied.Single().OldPath); - Assert.Equal("copied.txt", changes.Copied.Single().Path); + Assert.Equal(originalPath, changes.Copied.Single().OldPath); + Assert.Equal(copiedPath, changes.Copied.Single().Path); } } @@ -650,7 +650,7 @@ public void CanNotDetectTheExactCopyingOfModifiedFilesWhenNotEnabled() Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree); + var changes = repo.Diff.Compare(old.Tree, @new.Tree); Assert.Equal(2, changes.Count()); Assert.Equal(0, changes.Copied.Count()); @@ -674,7 +674,7 @@ public void CanIncludeUnmodifiedEntriesWhenEnabled() repo.Index.Stage("b.txt"); Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions {IncludeUnmodified = true}); Assert.Equal(2, changes.Count()); @@ -722,7 +722,7 @@ public void CanDetectTheExactRenamingExactCopyingOfNonModifiedAndModifiedFilesWh Commit @new = repo.Commit("Updated", Constants.Signature, Constants.Signature); - TreeChanges changes = repo.Diff.Compare(old.Tree, @new.Tree, + var changes = repo.Diff.Compare(old.Tree, @new.Tree, compareOptions: new CompareOptions { @@ -732,13 +732,13 @@ public void CanDetectTheExactRenamingExactCopyingOfNonModifiedAndModifiedFilesWh Assert.Equal(4, changes.Count()); Assert.Equal(1, changes.Modified.Count()); Assert.Equal(1, changes.Renamed.Count()); - Assert.Equal("original.txt", changes.Renamed.Single().OldPath); - Assert.Equal("renamed.txt", changes.Renamed.Single().Path); + Assert.Equal(originalPath, changes.Renamed.Single().OldPath); + Assert.Equal(renamedPath, changes.Renamed.Single().Path); Assert.Equal(2, changes.Copied.Count()); - Assert.Equal("original2.txt", changes.Copied.ElementAt(0).OldPath); - Assert.Equal("copied.txt", changes.Copied.ElementAt(0).Path); - Assert.Equal("original3.txt", changes.Copied.ElementAt(1).OldPath); - Assert.Equal("copied2.txt", changes.Copied.ElementAt(1).Path); + Assert.Equal(originalPath2, changes.Copied.ElementAt(0).OldPath); + Assert.Equal(copiedPath1, changes.Copied.ElementAt(0).Path); + Assert.Equal(originalPath3, changes.Copied.ElementAt(1).OldPath); + Assert.Equal(copiedPath2, changes.Copied.ElementAt(1).Path); } } /* @@ -786,11 +786,12 @@ public void CanCompareTwoVersionsOfAFileWithATrailingNewlineDeletion(int context Assert.Equal(expectedPatchLength, patch.Content.Length); - ContentChanges contentChanges = patch["numbers.txt"]; + PatchEntryChanges entryChanges = patch["numbers.txt"]; - Assert.Equal(2, contentChanges.LinesAdded); - Assert.Equal(1, contentChanges.LinesDeleted); - Assert.Equal(expectedPatchLength, contentChanges.Patch.Length); + Assert.Equal(2, entryChanges.LinesAdded); + Assert.Equal(1, entryChanges.LinesDeleted); + Assert.Equal(expectedPatchLength, entryChanges.Patch.Length); + Assert.Equal("numbers.txt", entryChanges.Path); } } @@ -881,14 +882,15 @@ public void CanCompareTwoVersionsOfAFileWithADiffOfTwoHunks(int contextLines, in var patch = repo.Diff.Compare(rootCommitTree, mergedCommitTree, compareOptions: compareOptions); - ContentChanges contentChanges = patch["numbers.txt"]; + PatchEntryChanges entryChanges = patch["numbers.txt"]; - Assert.Equal(3, contentChanges.LinesAdded); - Assert.Equal(1, contentChanges.LinesDeleted); + Assert.Equal(3, entryChanges.LinesAdded); + Assert.Equal(1, entryChanges.LinesDeleted); Assert.Equal(Expected("f8d44d7...7252fe2/numbers.txt-{0}-{1}.diff", contextLines, interhunkLines), - contentChanges.Patch); + entryChanges.Patch); Assert.Equal(Expected("f8d44d7...7252fe2/full-{0}-{1}.diff", contextLines, interhunkLines), patch); + Assert.Equal("numbers.txt", entryChanges.Path); } } diff --git a/LibGit2Sharp.Tests/FetchFixture.cs b/LibGit2Sharp.Tests/FetchFixture.cs index 26b5c0460..b9a4048a7 100644 --- a/LibGit2Sharp.Tests/FetchFixture.cs +++ b/LibGit2Sharp.Tests/FetchFixture.cs @@ -60,7 +60,7 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials() // Perform the actual fetch repo.Network.Fetch(remote, new FetchOptions { - Credentials = Constants.PrivateRepoCredentials + CredentialsProvider = Constants.PrivateRepoCredentials }); } } diff --git a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj index b07fcec44..6a1fd4038 100644 --- a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj +++ b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj @@ -62,6 +62,7 @@ + diff --git a/LibGit2Sharp.Tests/MergeFixture.cs b/LibGit2Sharp.Tests/MergeFixture.cs index 2fcf9c646..7801de718 100644 --- a/LibGit2Sharp.Tests/MergeFixture.cs +++ b/LibGit2Sharp.Tests/MergeFixture.cs @@ -351,7 +351,7 @@ public void MergeReportsCheckoutProgress() using (var repo = new Repository(repoPath)) { Commit commitToMerge = repo.Branches["normal_merge"].Tip; - + bool wasCalled = false; MergeOptions options = new MergeOptions() @@ -471,6 +471,19 @@ public void FastForwardNonFastForwardableMergeThrows() } } + [Fact] + public void CanForceFastForwardMergeThroughConfig() + { + string path = CloneMergeTestRepo(); + using (var repo = new Repository(path)) + { + repo.Config.Set("merge.ff", "only"); + + Commit commitToMerge = repo.Branches["normal_merge"].Tip; + Assert.Throws(() => repo.Merge(commitToMerge, Constants.Signature, new MergeOptions())); + } + } + [Fact] public void CanMergeAndNotCommit() { @@ -508,6 +521,24 @@ public void CanForceNonFastForwardMerge() } } + [Fact] + public void CanForceNonFastForwardMergeThroughConfig() + { + string path = CloneMergeTestRepo(); + using (var repo = new Repository(path)) + { + repo.Config.Set("merge.ff", "false"); + + Commit commitToMerge = repo.Branches["fast_forward"].Tip; + + MergeResult result = repo.Merge(commitToMerge, Constants.Signature, new MergeOptions()); + + Assert.Equal(MergeStatus.NonFastForward, result.Status); + Assert.Equal("f58f780d5a0ae392efd4a924450b1bbdc0577d32", result.Commit.Id.Sha); + Assert.False(repo.Index.RetrieveStatus().Any()); + } + } + [Fact] public void VerifyUpToDateMerge() { @@ -541,6 +572,32 @@ public void CanMergeCommittish(string committish, FastForwardStrategy strategy, } } + [Theory] + [InlineData(true, FastForwardStrategy.FastForwardOnly)] + [InlineData(false, FastForwardStrategy.FastForwardOnly)] + [InlineData(true, FastForwardStrategy.NoFastFoward)] + [InlineData(false, FastForwardStrategy.NoFastFoward)] + public void MergeWithWorkDirConflictsThrows(bool shouldStage, FastForwardStrategy strategy) + { + // Merging the fast_forward branch results in a change to file + // b.txt. In this test we modify the file in the working directory + // and then attempt to perform a merge. We expect the merge to fail + // due to merge conflicts. + string committishToMerge = "fast_forward"; + + using (var repo = new Repository(CloneMergeTestRepo())) + { + Touch(repo.Info.WorkingDirectory, "b.txt", "this is an alternate change"); + + if (shouldStage) + { + repo.Index.Stage("b.txt"); + } + + Assert.Throws(() => repo.Merge(committishToMerge, Constants.Signature, new MergeOptions() { FastForwardStrategy = strategy })); + } + } + [Theory] [InlineData(CheckoutFileConflictStrategy.Ours)] [InlineData(CheckoutFileConflictStrategy.Theirs)] diff --git a/LibGit2Sharp.Tests/MetaFixture.cs b/LibGit2Sharp.Tests/MetaFixture.cs index 0c86eccb0..3cff83cc1 100644 --- a/LibGit2Sharp.Tests/MetaFixture.cs +++ b/LibGit2Sharp.Tests/MetaFixture.cs @@ -109,12 +109,12 @@ public void TypesInLibGit2SharpMustBeExtensibleInATestingContext() } [Fact] - public void LibGit2SharpInterfacesCoverAllPublicMembers() + public void LibGit2SharpPublicInterfacesCoverAllPublicMembers() { var methodsMissingFromInterfaces = from t in Assembly.GetAssembly(typeof(IRepository)).GetExportedTypes() where !t.IsInterface - where t.GetInterfaces().Any(i => i.Namespace == typeof(IRepository).Namespace) + where t.GetInterfaces().Any(i => i.IsPublic && i.Namespace == typeof(IRepository).Namespace) let interfaceTargetMethods = from i in t.GetInterfaces() from im in t.GetInterfaceMap(i).TargetMethods select im diff --git a/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs b/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs index 649cb26ec..c6e724c10 100644 --- a/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs +++ b/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs @@ -556,5 +556,47 @@ public void CalculatingHistoryDivergenceWithBadParamsThrows() () => repo.ObjectDatabase.CalculateHistoryDivergence(null, repo.Head.Tip)); } } + + [Fact] + public void CanShortenObjectIdentifier() + { + /* + * $ echo "aabqhq" | git hash-object -t blob --stdin + * dea509d0b3cb8ee0650f6ca210bc83f4678851ba + * + * $ echo "aaazvc" | git hash-object -t blob --stdin + * dea509d097ce692e167dfc6a48a7a280cc5e877e + */ + + string path = CloneBareTestRepo(); + using (var repo = new Repository(path)) + { + repo.Config.Set("core.abbrev", 4); + + Blob blob1 = CreateBlob(repo, "aabqhq\n"); + Assert.Equal("dea509d0b3cb8ee0650f6ca210bc83f4678851ba", blob1.Sha); + + Assert.Equal("dea5", repo.ObjectDatabase.ShortenObjectId(blob1)); + Assert.Equal("dea509d0b3cb", repo.ObjectDatabase.ShortenObjectId(blob1, 12)); + Assert.Equal("dea509d0b3cb8ee0650f6ca210bc83f4678851b", repo.ObjectDatabase.ShortenObjectId(blob1, 39)); + + Blob blob2 = CreateBlob(repo, "aaazvc\n"); + Assert.Equal("dea509d09", repo.ObjectDatabase.ShortenObjectId(blob2)); + Assert.Equal("dea509d09", repo.ObjectDatabase.ShortenObjectId(blob2, 4)); + Assert.Equal("dea509d0b", repo.ObjectDatabase.ShortenObjectId(blob1)); + Assert.Equal("dea509d0b", repo.ObjectDatabase.ShortenObjectId(blob1, 7)); + + Assert.Equal("dea509d0b3cb", repo.ObjectDatabase.ShortenObjectId(blob1, 12)); + Assert.Equal("dea509d097ce", repo.ObjectDatabase.ShortenObjectId(blob2, 12)); + } + } + + private static Blob CreateBlob(Repository repo, string content) + { + using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(content))) + { + return repo.ObjectDatabase.CreateBlob(stream); + } + } } } diff --git a/LibGit2Sharp.Tests/OdbBackendFixture.cs b/LibGit2Sharp.Tests/OdbBackendFixture.cs index 1304d1097..c99442c9b 100644 --- a/LibGit2Sharp.Tests/OdbBackendFixture.cs +++ b/LibGit2Sharp.Tests/OdbBackendFixture.cs @@ -177,10 +177,92 @@ public void CanPushWithACustomBackend() } } + [Fact] + public void CanShortenObjectIdentifier() + { + /* + * $ echo "aabqhq" | git hash-object -t blob --stdin + * dea509d0b3cb8ee0650f6ca210bc83f4678851ba + * + * $ echo "aaazvc" | git hash-object -t blob --stdin + * dea509d097ce692e167dfc6a48a7a280cc5e877e + */ + + string path = CloneBareTestRepo(); + using (var repo = new Repository(path)) + { + repo.ObjectDatabase.AddBackend(new MockOdbBackend(), 5); + + repo.Config.Set("core.abbrev", 4); + + Blob blob1 = CreateBlob(repo, "aabqhq\n"); + Assert.Equal("dea509d0b3cb8ee0650f6ca210bc83f4678851ba", blob1.Sha); + + Assert.Equal("dea5", repo.ObjectDatabase.ShortenObjectId(blob1)); + Assert.Equal("dea509d0b3cb", repo.ObjectDatabase.ShortenObjectId(blob1, 12)); + Assert.Equal("dea509d0b3cb8ee0650f6ca210bc83f4678851b", repo.ObjectDatabase.ShortenObjectId(blob1, 39)); + + Blob blob2 = CreateBlob(repo, "aaazvc\n"); + Assert.Equal("dea509d09", repo.ObjectDatabase.ShortenObjectId(blob2)); + Assert.Equal("dea509d09", repo.ObjectDatabase.ShortenObjectId(blob2, 4)); + Assert.Equal("dea509d0b", repo.ObjectDatabase.ShortenObjectId(blob1)); + Assert.Equal("dea509d0b", repo.ObjectDatabase.ShortenObjectId(blob1, 7)); + + Assert.Equal("dea509d0b3cb", repo.ObjectDatabase.ShortenObjectId(blob1, 12)); + Assert.Equal("dea509d097ce", repo.ObjectDatabase.ShortenObjectId(blob2, 12)); + } + } + + private static Blob CreateBlob(Repository repo, string content) + { + using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(content))) + { + return repo.ObjectDatabase.CreateBlob(stream); + } + } + + [Fact] + public void ADisposableOdbBackendGetsDisposedUponRepositoryDisposal() + { + string path = InitNewRepository(); + + int nbOfDisposeCalls = 0; + + using (var repo = new Repository(path)) + { + var mockOdbBackend = new MockOdbBackend(() => { nbOfDisposeCalls++; }); + + Assert.IsAssignableFrom(mockOdbBackend); + + repo.ObjectDatabase.AddBackend(mockOdbBackend, 5); + + Assert.Equal(0, nbOfDisposeCalls); + } + + Assert.Equal(1, nbOfDisposeCalls); + } + #region MockOdbBackend - private class MockOdbBackend : OdbBackend + private class MockOdbBackend : OdbBackend, IDisposable { + public MockOdbBackend(Action disposer = null) + { + this.disposer = disposer; + } + + public void Dispose() + { + if (disposer == null) + { + return; + } + + disposer(); + + disposer = null; + } + protected override OdbBackendOperations SupportedOperations { get @@ -190,12 +272,13 @@ protected override OdbBackendOperations SupportedOperations OdbBackendOperations.Write | OdbBackendOperations.WriteStream | OdbBackendOperations.Exists | + OdbBackendOperations.ExistsPrefix | OdbBackendOperations.ForEach | OdbBackendOperations.ReadHeader; } } - public override int Read(ObjectId oid, out Stream data, out ObjectType objectType) + public override int Read(ObjectId oid, out UnmanagedMemoryStream data, out ObjectType objectType) { data = null; objectType = default(ObjectType); @@ -219,7 +302,7 @@ public override int Read(ObjectId oid, out Stream data, out ObjectType objectTyp return (int)ReturnCode.GIT_OK; } - public override int ReadPrefix(string shortSha, out ObjectId id, out Stream data, out ObjectType objectType) + public override int ReadPrefix(string shortSha, out ObjectId id, out UnmanagedMemoryStream data, out ObjectType objectType) { id = null; data = null; @@ -301,6 +384,37 @@ public override bool Exists(ObjectId oid) return m_objectIdToContent.ContainsKey(oid); } + public override int ExistsPrefix(string shortSha, out ObjectId found) + { + found = null; + int numFound = 0; + + foreach (ObjectId id in m_objectIdToContent.Keys) + { + if (!id.Sha.StartsWith(shortSha)) + { + continue; + } + + found = id; + numFound++; + + if (numFound > 1) + { + found = null; + return (int) ReturnCode.GIT_EAMBIGUOUS; + } + } + + if (numFound == 0) + { + found = null; + return (int)ReturnCode.GIT_ENOTFOUND; + } + + return (int)ReturnCode.GIT_OK; + } + public override int ReadHeader(ObjectId oid, out int length, out ObjectType objectType) { objectType = default(ObjectType); @@ -322,6 +436,8 @@ public override int ReadHeader(ObjectId oid, out int length, out ObjectType obje private readonly Dictionary m_objectIdToContent = new Dictionary(); + private Action disposer; + #region Unimplemented public override int ReadStream(ObjectId oid, out OdbBackendStream stream) diff --git a/LibGit2Sharp.Tests/ReferenceFixture.cs b/LibGit2Sharp.Tests/ReferenceFixture.cs index 9b25d47b4..6090d8e09 100644 --- a/LibGit2Sharp.Tests/ReferenceFixture.cs +++ b/LibGit2Sharp.Tests/ReferenceFixture.cs @@ -13,7 +13,7 @@ public class ReferenceFixture : BaseFixture { "refs/heads/br2", "refs/heads/deadbeef", "refs/heads/master", "refs/heads/packed", "refs/heads/packed-test", "refs/heads/test", "refs/notes/answer", "refs/notes/answer2", "refs/notes/commits", "refs/tags/e90810b", - "refs/tags/lw", "refs/tags/point_to_blob", "refs/tags/test" + "refs/tags/lw", "refs/tags/point_to_blob", "refs/tags/tag_without_tagger", "refs/tags/test" }; [Fact] @@ -320,7 +320,7 @@ public void CanListAllReferencesEvenCorruptedOnes() Assert.Equal(expectedRefs, SortedRefs(repo, r => r.CanonicalName)); - Assert.Equal(13, repo.Refs.Count()); + Assert.Equal(14, repo.Refs.Count()); } } @@ -730,9 +730,9 @@ public void CanFilterReferencesWithAGlob() { using (var repo = new Repository(BareTestRepoPath)) { - Assert.Equal(12, repo.Refs.FromGlob("*").Count()); + Assert.Equal(13, repo.Refs.FromGlob("*").Count()); Assert.Equal(5, repo.Refs.FromGlob("refs/heads/*").Count()); - Assert.Equal(4, repo.Refs.FromGlob("refs/tags/*").Count()); + Assert.Equal(5, repo.Refs.FromGlob("refs/tags/*").Count()); Assert.Equal(3, repo.Refs.FromGlob("*t?[pqrs]t*").Count()); Assert.Equal(0, repo.Refs.FromGlob("test").Count()); } diff --git a/LibGit2Sharp.Tests/RemoteFixture.cs b/LibGit2Sharp.Tests/RemoteFixture.cs index b33213495..f07ba3ffb 100644 --- a/LibGit2Sharp.Tests/RemoteFixture.cs +++ b/LibGit2Sharp.Tests/RemoteFixture.cs @@ -214,5 +214,110 @@ public void CanDeleteNonExistingRemote() repo.Network.Remotes.Remove("i_dont_exist"); } } + + [Fact] + public void CanRenameExistingRemote() + { + var path = CloneStandardTestRepo(); + using (var repo = new Repository(path)) + { + Assert.NotNull(repo.Network.Remotes["origin"]); + Assert.Null(repo.Network.Remotes["renamed"]); + Assert.NotEmpty(repo.Refs.FromGlob("refs/remotes/origin/*")); + Assert.Empty(repo.Refs.FromGlob("refs/remotes/renamed/*")); + + repo.Network.Remotes.Rename("origin", "renamed", problem => Assert.True(false)); + Assert.Null(repo.Network.Remotes["origin"]); + Assert.Empty(repo.Refs.FromGlob("refs/remotes/origin/*")); + + Assert.NotNull(repo.Network.Remotes["renamed"]); + Assert.NotEmpty(repo.Refs.FromGlob("refs/remotes/renamed/*")); + } + } + + [Fact] + public void CanRenameNonExistingRemote() + { + using (var repo = new Repository(StandardTestRepoPath)) + { + Assert.Null(repo.Network.Remotes["i_dont_exist"]); + + repo.Network.Remotes.Rename("i_dont_exist", "i_dont_either", problem => Assert.True(false)); + Assert.Null(repo.Network.Remotes["i_dont_either"]); + } + } + + [Fact] + public void ReportsRemotesWithNonDefaultRefSpecs() + { + var path = CloneStandardTestRepo(); + using (var repo = new Repository(path)) + { + Assert.NotNull(repo.Network.Remotes["origin"]); + + repo.Network.Remotes.Update( + repo.Network.Remotes["origin"], + r => r.FetchRefSpecs = new[] { "+refs/heads/*:refs/remotes/upstream/*" }); + + repo.Network.Remotes.Rename("origin", "nondefault", problem => Assert.Equal("+refs/heads/*:refs/remotes/upstream/*", problem)); + + Assert.NotEmpty(repo.Refs.FromGlob("refs/remotes/nondefault/*")); + Assert.Empty(repo.Refs.FromGlob("refs/remotes/upstream/*")); + + Assert.Null(repo.Network.Remotes["origin"]); + Assert.NotNull(repo.Network.Remotes["nondefault"]); + } + } + + [Fact] + public void DoesNotReportRemotesWithAlreadyExistingRefSpec() + { + var path = CloneStandardTestRepo(); + using (var repo = new Repository(path)) + { + Assert.NotNull(repo.Network.Remotes["origin"]); + + repo.Refs.Add("refs/remotes/renamed/master", "32eab9cb1f450b5fe7ab663462b77d7f4b703344"); + + repo.Network.Remotes.Rename("origin", "renamed", problem => Assert.True(false)); + + Assert.NotEmpty(repo.Refs.FromGlob("refs/remotes/renamed/*")); + Assert.Empty(repo.Refs.FromGlob("refs/remotes/origin/*")); + + Assert.Null(repo.Network.Remotes["origin"]); + Assert.NotNull(repo.Network.Remotes["renamed"]); + } + } + + [Fact] + public void CanNotRenameWhenRemoteWithSameNameExists() + { + const string name = "upstream"; + const string url = "https://github.com/libgit2/libgit2sharp.git"; + + var path = CloneStandardTestRepo(); + using (var repo = new Repository(path)) + { + Assert.NotNull(repo.Network.Remotes["origin"]); + repo.Network.Remotes.Add(name, url); + + Assert.Throws(() => repo.Network.Remotes.Rename("origin", "upstream")); + } + } + + [Theory] + [InlineData("git@github.com:org/repo.git", false)] + [InlineData("git://site.com:80/org/repo.git", true)] + [InlineData("ssh://user@host.com:80/org/repo.git", false)] + [InlineData("http://site.com:80/org/repo.git", true)] + [InlineData("https://github.com:80/org/repo.git", true)] + [InlineData("ftp://site.com:80/org/repo.git", false)] + [InlineData("ftps://site.com:80/org/repo.git", false)] + [InlineData("file:///path/repo.git", true)] + [InlineData("protocol://blah.meh/whatever.git", false)] + public void CanCheckIfUrlisSupported(string url, bool supported) + { + Assert.Equal(supported, Remote.IsSupportedUrl(url)); + } } } diff --git a/LibGit2Sharp.Tests/RemoveFixture.cs b/LibGit2Sharp.Tests/RemoveFixture.cs index 6dc6507cb..04d12feec 100644 --- a/LibGit2Sharp.Tests/RemoveFixture.cs +++ b/LibGit2Sharp.Tests/RemoveFixture.cs @@ -180,7 +180,7 @@ public void RemovingFileWithBadParamsThrows() Assert.Throws(() => repo.Index.Remove(string.Empty)); Assert.Throws(() => repo.Index.Remove((string)null)); Assert.Throws(() => repo.Index.Remove(new string[] { })); - Assert.Throws(() => repo.Index.Remove(new string[] { null })); + Assert.Throws(() => repo.Index.Remove(new string[] { null })); } } } diff --git a/LibGit2Sharp.Tests/RepositoryFixture.cs b/LibGit2Sharp.Tests/RepositoryFixture.cs index f5916f5f2..7f4d208a0 100644 --- a/LibGit2Sharp.Tests/RepositoryFixture.cs +++ b/LibGit2Sharp.Tests/RepositoryFixture.cs @@ -110,7 +110,7 @@ public void CanRetrieveValidVersionString() Assert.True(regexResult.Success, "The following version string format is enforced:" + "Major.Minor.Patch-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|amd64 - features)"); - + GroupCollection matchGroups = regexResult.Groups; // Check that all groups are valid diff --git a/LibGit2Sharp.Tests/ResetHeadFixture.cs b/LibGit2Sharp.Tests/ResetHeadFixture.cs index 82fe2c535..870e46c39 100644 --- a/LibGit2Sharp.Tests/ResetHeadFixture.cs +++ b/LibGit2Sharp.Tests/ResetHeadFixture.cs @@ -18,7 +18,7 @@ public void ResetANewlyInitializedRepositoryThrows(bool isBare) using (var repo = new Repository(repoPath)) { - Assert.Throws(() => repo.Reset(ResetMode.Soft)); + Assert.Throws(() => repo.Reset(ResetMode.Soft)); } } diff --git a/LibGit2Sharp.Tests/ResetIndexFixture.cs b/LibGit2Sharp.Tests/ResetIndexFixture.cs index 23e6a1cc4..9cc7849ac 100644 --- a/LibGit2Sharp.Tests/ResetIndexFixture.cs +++ b/LibGit2Sharp.Tests/ResetIndexFixture.cs @@ -25,7 +25,7 @@ public void ResetANewlyInitializedNonBareRepositoryThrows() using (var repo = new Repository(repoPath)) { - Assert.Throws(() => repo.Reset()); + Assert.Throws(() => repo.Reset()); } } @@ -151,5 +151,59 @@ public void ResettingTheIndexToASubsetOfTheContentOfACommitWithCommitAsArgumentA repo.Reset(repo.Lookup("5b5b025"), new[] { "new.txt", "non-existent-path-28.txt" }, new ExplicitPathsOptions())); } } + + [Fact] + public void CanResetTheIndexWhenARenameExists() + { + using (var repo = new Repository(CloneStandardTestRepo())) + { + repo.Index.Move("branch_file.txt", "renamed_branch_file.txt"); + repo.Reset(repo.Lookup("32eab9c")); + + RepositoryStatus status = repo.Index.RetrieveStatus(); + Assert.Equal(0, status.Where(IsStaged).Count()); + } + } + + [Fact] + public void CanResetSourceOfARenameInIndex() + { + using (var repo = new Repository(CloneStandardTestRepo())) + { + repo.Index.Move("branch_file.txt", "renamed_branch_file.txt"); + + RepositoryStatus oldStatus = repo.Index.RetrieveStatus(); + Assert.Equal(1, oldStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.Nonexistent, oldStatus["branch_file.txt"].State); + Assert.Equal(FileStatus.RenamedInIndex, oldStatus["renamed_branch_file.txt"].State); + + repo.Reset(repo.Lookup("32eab9c"), new string[] { "branch_file.txt" }); + + RepositoryStatus newStatus = repo.Index.RetrieveStatus(); + Assert.Equal(0, newStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.Missing, newStatus["branch_file.txt"].State); + Assert.Equal(FileStatus.Added, newStatus["renamed_branch_file.txt"].State); + } + } + + [Fact] + public void CanResetTargetOfARenameInIndex() + { + using (var repo = new Repository(CloneStandardTestRepo())) + { + repo.Index.Move("branch_file.txt", "renamed_branch_file.txt"); + + RepositoryStatus oldStatus = repo.Index.RetrieveStatus(); + Assert.Equal(1, oldStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.RenamedInIndex, oldStatus["renamed_branch_file.txt"].State); + + repo.Reset(repo.Lookup("32eab9c"), new string[] { "renamed_branch_file.txt" }); + + RepositoryStatus newStatus = repo.Index.RetrieveStatus(); + Assert.Equal(0, newStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.Untracked, newStatus["renamed_branch_file.txt"].State); + Assert.Equal(FileStatus.Removed, newStatus["branch_file.txt"].State); + } + } } } diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/0a-no-change.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0a-no-change.txt new file mode 100644 index 000000000..68c6c84b0 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0a-no-change.txt @@ -0,0 +1,21 @@ +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. +there is no change in this file. diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/0b-duplicated-in-ours.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0b-duplicated-in-ours.txt new file mode 100644 index 000000000..f0ce2b8e4 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0b-duplicated-in-ours.txt @@ -0,0 +1,23 @@ +this file will be rewritten in +ours, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. + +this file will be rewritten in +ours, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. + +this file will be rewritten in +ours, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. + +this file will be rewritten in +ours, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/0b-rewritten-in-ours.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0b-rewritten-in-ours.txt new file mode 100644 index 000000000..8aac75de2 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0b-rewritten-in-ours.txt @@ -0,0 +1,31 @@ +this file was rewritten in the +ours branch, and the original +file was copied to the file +0b-duplicated-in-ours.txt. that +duplicated file will not be +eligible for rename detection. + +<<<<<<< HEAD +this file was rewritten in the +ours branch, and the original +file was copied to the file +0b-duplicated-in-ours.txt. that +duplicated file will not be +eligible for rename detection. +======= +note that it has also been edited +in the theirs branch + +this file will be rewritten in +ours, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. +>>>>>>> rename_conflict_theirs + +this file was rewritten in the +ours branch, and the original +file was copied to the file +0b-duplicated-in-ours.txt. that +duplicated file will not be +eligible for rename detection. diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/0c-duplicated-in-theirs.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0c-duplicated-in-theirs.txt new file mode 100644 index 000000000..2f5612010 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0c-duplicated-in-theirs.txt @@ -0,0 +1,23 @@ +this file will be rewritten in +theirs, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. + +this file will be rewritten in +theirs, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. + +this file will be rewritten in +theirs, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. + +this file will be rewritten in +theirs, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/0c-rewritten-in-theirs.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0c-rewritten-in-theirs.txt new file mode 100644 index 000000000..7edc72632 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/0c-rewritten-in-theirs.txt @@ -0,0 +1,39 @@ +this file was rewritten in the +theirs branch, and the original +file was copied to the file +0c-duplicated-in-theirs.txt. that +duplicated file will not be +eligible for rename detection. + +<<<<<<< HEAD +note that is has also been edited +in the ours branch + +this file will be rewritten in +theirs, and its contents will be +duplicated in another file. +but it will not be eligible for +rename detection. +======= +this file was rewritten in the +theirs branch, and the original +file was copied to the file +0c-duplicated-in-theirs.txt. that +duplicated file will not be +eligible for rename detection. +>>>>>>> rename_conflict_theirs + +this file was rewritten in the +theirs branch, and the original +file was copied to the file +0c-duplicated-in-theirs.txt. that +duplicated file will not be +eligible for rename detection. + +this file was rewritten in the +theirs branch, and the original +file was copied to the file +0c-duplicated-in-theirs.txt. that +duplicated file will not be +eligible for rename detection. + diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/1a-newname-in-ours-edited-in-theirs.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1a-newname-in-ours-edited-in-theirs.txt new file mode 100644 index 000000000..0d872f8e8 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1a-newname-in-ours-edited-in-theirs.txt @@ -0,0 +1,25 @@ +this will be renamed in ours +and edited in theirs + +(indeed, it is edited in theirs) + +this will be renamed in ours +and edited in theirs + +this will be renamed in ours +and edited in theirs + +this will be renamed in ours +and edited in theirs + +this will be renamed in ours +and edited in theirs + +this will be renamed in ours +and edited in theirs + +this will be renamed in ours +and edited in theirs + +this will be renamed in ours +and edited in theirs diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/1a-newname-in-ours.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1a-newname-in-ours.txt new file mode 100644 index 000000000..d0d4594e1 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1a-newname-in-ours.txt @@ -0,0 +1,16 @@ +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours +this will be renamed in ours diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/1b-newname-in-theirs-edited-in-ours.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1b-newname-in-theirs-edited-in-ours.txt new file mode 100644 index 000000000..ed9523e62 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1b-newname-in-theirs-edited-in-ours.txt @@ -0,0 +1,25 @@ +this will be renamed in theirs +and edited in ours + +(and lo, it is edited in ours) + +this will be renamed in theirs +and edited in ours + +this will be renamed in theirs +and edited in ours + +this will be renamed in theirs +and edited in ours + +this will be renamed in theirs +and edited in ours + +this will be renamed in theirs +and edited in ours + +this will be renamed in theirs +and edited in ours + +this will be renamed in theirs +and edited in ours diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/1b-newname-in-theirs.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1b-newname-in-theirs.txt new file mode 100644 index 000000000..2b5f1f181 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/1b-newname-in-theirs.txt @@ -0,0 +1,14 @@ +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs +this will be renamed in theirs diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/2-newname-in-both.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/2-newname-in-both.txt new file mode 100644 index 000000000..178940b45 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/2-newname-in-both.txt @@ -0,0 +1,20 @@ +this file will be renamed +in both branches + +this file will be renamed +in both branches + +this file will be renamed +in both branches + +this file will be renamed +in both branches + +this file will be renamed +in both branches + +this file will be renamed +in both branches + +this file will be renamed +in both branches diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/3a-newname-in-ours-deleted-in-theirs.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/3a-newname-in-ours-deleted-in-theirs.txt new file mode 100644 index 000000000..18cb316b1 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/3a-newname-in-ours-deleted-in-theirs.txt @@ -0,0 +1,20 @@ +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/3b-newname-in-theirs-deleted-in-ours.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/3b-newname-in-theirs-deleted-in-ours.txt new file mode 100644 index 000000000..36219b493 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/3b-newname-in-theirs-deleted-in-ours.txt @@ -0,0 +1,23 @@ +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs + +this will be renamed in ours +and deleted in theirs diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/4a-newname-in-ours-added-in-theirs.txt~HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4a-newname-in-ours-added-in-theirs.txt~HEAD new file mode 100644 index 000000000..227792b52 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4a-newname-in-ours-added-in-theirs.txt~HEAD @@ -0,0 +1,24 @@ +this will be renamed in ours +and a file with the same name +will be independently added +in theirs + +this will be renamed in ours +and a file with the same name +will be independently added +in theirs + +this will be renamed in ours +and a file with the same name +will be independently added +in theirs + +this will be renamed in ours +and a file with the same name +will be independently added +in theirs + +this will be renamed in ours +and a file with the same name +will be independently added +in theirs diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/4a-newname-in-ours-added-in-theirs.txt~rename_conflict_theirs b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4a-newname-in-ours-added-in-theirs.txt~rename_conflict_theirs new file mode 100644 index 000000000..8b5b53cb2 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4a-newname-in-ours-added-in-theirs.txt~rename_conflict_theirs @@ -0,0 +1,23 @@ +this file was rewritten in +theirs and will appear as an +independent add of a file + +this file was rewritten in +theirs and will appear as an +independent add of a file + +this file was rewritten in +theirs and will appear as an +independent add of a file + +this file was rewritten in +theirs and will appear as an +independent add of a file + +this file was rewritten in +theirs and will appear as an +independent add of a file + +this file was rewritten in +theirs and will appear as an +independent add of a file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/4b-newname-in-theirs-added-in-ours.txt~HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4b-newname-in-theirs-added-in-ours.txt~HEAD new file mode 100644 index 000000000..de872ee36 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4b-newname-in-theirs-added-in-ours.txt~HEAD @@ -0,0 +1,19 @@ +this file was rewritten in +ours and will appear as an +independent add of a file + +this file was rewritten in +ours and will appear as an +independent add of a file + +this file was rewritten in +ours and will appear as an +independent add of a file + +this file was rewritten in +ours and will appear as an +independent add of a file + +this file was rewritten in +ours and will appear as an +independent add of a file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/4b-newname-in-theirs-added-in-ours.txt~rename_conflict_theirs b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4b-newname-in-theirs-added-in-ours.txt~rename_conflict_theirs new file mode 100644 index 000000000..98d52d07c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/4b-newname-in-theirs-added-in-ours.txt~rename_conflict_theirs @@ -0,0 +1,24 @@ +this will be renamed in theirs +and a file with the same name +will be independently added +in ours + +this will be renamed in theirs +and a file with the same name +will be independently added +in ours + +this will be renamed in theirs +and a file with the same name +will be independently added +in ours + +this will be renamed in theirs +and a file with the same name +will be independently added +in ours + +this will be renamed in theirs +and a file with the same name +will be independently added +in ours diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/5a-newname-in-ours-added-in-theirs.txt~HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5a-newname-in-ours-added-in-theirs.txt~HEAD new file mode 100644 index 000000000..d3719a5ae --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5a-newname-in-ours-added-in-theirs.txt~HEAD @@ -0,0 +1,18 @@ +This file will be +renamed in 'ours', +and a file of the +same name will be +added in 'theirs'. + +The original file +will exist in the +'theirs' side as +well. + +Expected index +entries are: + +1 A +3 A +2 B +3 B diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/5a-newname-in-ours-added-in-theirs.txt~rename_conflict_theirs b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5a-newname-in-ours-added-in-theirs.txt~rename_conflict_theirs new file mode 100644 index 000000000..98ba4205f --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5a-newname-in-ours-added-in-theirs.txt~rename_conflict_theirs @@ -0,0 +1,9 @@ +This file has +the same name +as a file that +was renamed in +the other branch. + +This will, upon +merging, lead to +a rename conflict. diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/5b-newname-in-theirs-added-in-ours.txt~HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5b-newname-in-theirs-added-in-ours.txt~HEAD new file mode 100644 index 000000000..385c8a0f2 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5b-newname-in-theirs-added-in-ours.txt~HEAD @@ -0,0 +1,10 @@ +This is the file +in 'theirs' that +was added with +the same name +that another file +was renamed to! + +This will cause +a rename/add +conflict! diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/5b-newname-in-theirs-added-in-ours.txt~rename_conflict_theirs b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5b-newname-in-theirs-added-in-ours.txt~rename_conflict_theirs new file mode 100644 index 000000000..632471253 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/5b-newname-in-theirs-added-in-ours.txt~rename_conflict_theirs @@ -0,0 +1,19 @@ +In the 'theirs' branch, +this file will be renamed +and in the 'ours' branch, +a file of the same name +will be added. This file +will continue to exist +in the 'ours' branch, +leading to a rename/add +conflict. + +In the 'theirs' branch, +this file will be renamed +and in the 'ours' branch, +a file of the same name +will be added. This file +will continue to exist +in the 'ours' branch, +leading to a rename/add +conflict. diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/6-both-renamed-1-to-2-ours.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/6-both-renamed-1-to-2-ours.txt new file mode 100644 index 000000000..d8fa77b68 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/6-both-renamed-1-to-2-ours.txt @@ -0,0 +1,23 @@ +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/6-both-renamed-1-to-2-theirs.txt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/6-both-renamed-1-to-2-theirs.txt new file mode 100644 index 000000000..d8fa77b68 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/6-both-renamed-1-to-2-theirs.txt @@ -0,0 +1,23 @@ +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches + +this file will be renamed +(differently) in both the +ours and the theirs branches diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/7-both-renamed.txt~HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/7-both-renamed.txt~HEAD new file mode 100644 index 000000000..b42712cfe --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/7-both-renamed.txt~HEAD @@ -0,0 +1,23 @@ +this is one file that will be renamed +to a common name in the ours and theirs +branches + +this is one file that will be renamed +to a common name in the ours and theirs +branches + +this is one file that will be renamed +to a common name in the ours and theirs +branches + +this is one file that will be renamed +to a common name in the ours and theirs +branches + +this is one file that will be renamed +to a common name in the ours and theirs +branches + +this is one file that will be renamed +to a common name in the ours and theirs +branches diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/7-both-renamed.txt~rename_conflict_theirs b/LibGit2Sharp.Tests/Resources/mergerenames_wd/7-both-renamed.txt~rename_conflict_theirs new file mode 100644 index 000000000..b69fe837e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/7-both-renamed.txt~rename_conflict_theirs @@ -0,0 +1,23 @@ +this is a different file that will +also be renamed to a common file name +in the ours and theirs branches + - +this is a different file that will +also be renamed to a common file name +in the ours and theirs branches + - +this is a different file that will +also be renamed to a common file name +in the ours and theirs branches + - +this is a different file that will +also be renamed to a common file name +in the ours and theirs branches + - +this is a different file that will +also be renamed to a common file name +in the ours and theirs branches + - +this is a different file that will +also be renamed to a common file name +in the ours and theirs branches diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/COMMIT_EDITMSG b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/COMMIT_EDITMSG new file mode 100644 index 000000000..245b18a2c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/COMMIT_EDITMSG @@ -0,0 +1 @@ +rename conflict theirs diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/HEAD new file mode 100644 index 000000000..b7f23f5ed --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/rename_conflict_ours diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_HEAD new file mode 100644 index 000000000..130989399 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_HEAD @@ -0,0 +1 @@ +a802e06f1782a9645b9851bc7202cee74a8a4972 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_MODE b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_MODE new file mode 100644 index 000000000..fe93f7198 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_MODE @@ -0,0 +1 @@ +no-ff \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_MSG b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_MSG new file mode 100644 index 000000000..6121863d1 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/MERGE_MSG @@ -0,0 +1,23 @@ +Merge branch 'rename_conflict_theirs' + +Conflicts: + 0b-rewritten-in-ours.txt + 0c-rewritten-in-theirs.txt + 3a-newname-in-ours-deleted-in-theirs.txt + 3a-renamed-in-ours-deleted-in-theirs.txt + 3b-newname-in-theirs-deleted-in-ours.txt + 3b-renamed-in-theirs-deleted-in-ours.txt + 4a-newname-in-ours-added-in-theirs.txt + 4a-renamed-in-ours-added-in-theirs.txt + 4b-newname-in-theirs-added-in-ours.txt + 4b-renamed-in-theirs-added-in-ours.txt + 5a-newname-in-ours-added-in-theirs.txt + 5a-renamed-in-ours-added-in-theirs.txt + 5b-newname-in-theirs-added-in-ours.txt + 5b-renamed-in-theirs-added-in-ours.txt + 6-both-renamed-1-to-2-ours.txt + 6-both-renamed-1-to-2-theirs.txt + 6-both-renamed-1-to-2.txt + 7-both-renamed-side-1.txt + 7-both-renamed-side-2.txt + 7-both-renamed.txt diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/ORIG_HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/ORIG_HEAD new file mode 100644 index 000000000..a1c50dce8 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/ORIG_HEAD @@ -0,0 +1 @@ +34bfafff88eaf118402b44e6f3e2dbbf1a582b05 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/config b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/config new file mode 100644 index 000000000..623a0bf58 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/config @@ -0,0 +1,11 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + ignorecase = true + symlinks = false +[submodule "submodule"] + url = ../submodule +[merge] + conflictstyle = merge diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/index b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/index new file mode 100644 index 000000000..aaac9f967 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/index differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/logs/HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/logs/HEAD new file mode 100644 index 000000000..7b5293fd3 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/logs/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 bd593285fc7fe4ca18ccdbabf027f5d689101452 Edward Thomson 1365715620 -0500 moving to bd59328 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/logs/refs/heads/master b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/logs/refs/heads/master new file mode 100644 index 000000000..a46518da8 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 977c696519c5a3004c5f1d15d60c89dbeb8f235f Edward Thomson 1351875584 -0500 reset: moving to 977c696519c5a3004c5f1d15d60c89dbeb8f235f diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/ORIG_HEAD b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/ORIG_HEAD new file mode 100644 index 000000000..d1bfcf0f4 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/ORIG_HEAD @@ -0,0 +1 @@ +ae39c77c70cb6bad18bb471912460c4e1ba0f586 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/config b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/config new file mode 100644 index 000000000..575cc8599 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/config @@ -0,0 +1,15 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + worktree = ../../../submodule + symlinks = false + ignorecase = true + hideDotFiles = dotGitOnly +[remote "origin"] + url = c:/Temp/TestRepos/submodule + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/index b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/index new file mode 100644 index 000000000..e948afb27 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/index differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/info/exclude b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/info/exclude new file mode 100644 index 000000000..a5196d1be --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/18/fae1354bba0a5f1e6a531f9988369142c24a9e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/18/fae1354bba0a5f1e6a531f9988369142c24a9e new file mode 100644 index 000000000..fcf1c6381 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/18/fae1354bba0a5f1e6a531f9988369142c24a9e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/29/7aa6cd028b3336c7802c7a6f49143da4e1602d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/29/7aa6cd028b3336c7802c7a6f49143da4e1602d new file mode 100644 index 000000000..aa9fc5006 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/29/7aa6cd028b3336c7802c7a6f49143da4e1602d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/38/6c80dc813b89d719797668f40c1be0a6efa996 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/38/6c80dc813b89d719797668f40c1be0a6efa996 new file mode 100644 index 000000000..bc9a32ebc Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/38/6c80dc813b89d719797668f40c1be0a6efa996 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ab/435a147bae6d5906ecfd0916a570c4ab3eeea8 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ab/435a147bae6d5906ecfd0916a570c4ab3eeea8 new file mode 100644 index 000000000..65a8d759f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ab/435a147bae6d5906ecfd0916a570c4ab3eeea8 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ad/16e0a7684ea95bf892980a2ee412293ae979cc b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ad/16e0a7684ea95bf892980a2ee412293ae979cc new file mode 100644 index 000000000..49e1aafeb Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ad/16e0a7684ea95bf892980a2ee412293ae979cc differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ae/39c77c70cb6bad18bb471912460c4e1ba0f586 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ae/39c77c70cb6bad18bb471912460c4e1ba0f586 new file mode 100644 index 000000000..6ceffdd4e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/ae/39c77c70cb6bad18bb471912460c4e1ba0f586 @@ -0,0 +1,2 @@ +x !@=S hf%x! ]k/{k-a] xWs =,lP +#g0KIC ,51 9;alB=>|h}_{{Me?u6">:叄ʃ6^Kd \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/c2/0765f6e24e8bbb63a648d0d11d84da63170190 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/c2/0765f6e24e8bbb63a648d0d11d84da63170190 new file mode 100644 index 000000000..14781032f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/c2/0765f6e24e8bbb63a648d0d11d84da63170190 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/d3/d806a4bef96889117fd7ebac0e3cb5ec152932 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/d3/d806a4bef96889117fd7ebac0e3cb5ec152932 new file mode 100644 index 000000000..8df72a45c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/modules/submodule/objects/d3/d806a4bef96889117fd7ebac0e3cb5ec152932 @@ -0,0 +1,3 @@ +xA +0E]semDx$҂@gpQs^+ZD[a +,cGsBO# vhGpIZ4U{^c]zo@ǎ\M-\ ZC'g$楧f&%%g5qYeZokM2ԐX\ZDPC~^ZNfrIf^:XZHي1O(_,' jvn~JfZ&5&ؽ +gz43^2 I{| 2mg˾15ӿ,\})TC)0Xvz֛9MՅ'6b# \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/05/8541fc37114bfc1dddf6bd6bffc7fae5c2e6fe b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/05/8541fc37114bfc1dddf6bd6bffc7fae5c2e6fe new file mode 100644 index 000000000..d79dc30ba Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/05/8541fc37114bfc1dddf6bd6bffc7fae5c2e6fe differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/05/f3c1a2a56ca95c3d2ef28dc9ddf32b5cd6c91c b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/05/f3c1a2a56ca95c3d2ef28dc9ddf32b5cd6c91c new file mode 100644 index 000000000..7b4b152f3 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/05/f3c1a2a56ca95c3d2ef28dc9ddf32b5cd6c91c differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/07/a759da919f737221791d542f176ab49c88837f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/07/a759da919f737221791d542f176ab49c88837f new file mode 100644 index 000000000..a34b6c235 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/07/a759da919f737221791d542f176ab49c88837f differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/07/c514b04698e068892b31c8d352b85813b99c6e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/07/c514b04698e068892b31c8d352b85813b99c6e new file mode 100644 index 000000000..23ab92171 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/07/c514b04698e068892b31c8d352b85813b99c6e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/055301463b7f2f8ee5d368f8ed5c0a40ad8515 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/055301463b7f2f8ee5d368f8ed5c0a40ad8515 new file mode 100644 index 000000000..bf5b0fcc5 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/055301463b7f2f8ee5d368f8ed5c0a40ad8515 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/17bb159596aea4d295f4857da77e8f96b3c7dc b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/17bb159596aea4d295f4857da77e8f96b3c7dc new file mode 100644 index 000000000..9fb640dd5 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/17bb159596aea4d295f4857da77e8f96b3c7dc differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/2ce8682d7f3a2a3a769a6daca58950168ba5c4 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/2ce8682d7f3a2a3a769a6daca58950168ba5c4 new file mode 100644 index 000000000..b709cf461 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/2ce8682d7f3a2a3a769a6daca58950168ba5c4 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/3bebf072dd4bbba88833667d6ffe454df199e1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/3bebf072dd4bbba88833667d6ffe454df199e1 new file mode 100644 index 000000000..ae13207d7 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/3bebf072dd4bbba88833667d6ffe454df199e1 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/768bed22680cdb0859683fa9677ccc8d5a25c1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/768bed22680cdb0859683fa9677ccc8d5a25c1 new file mode 100644 index 000000000..5f4b4dab1 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/09/768bed22680cdb0859683fa9677ccc8d5a25c1 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0a/75d9aac1dc84fb5aa51f7325c0ab53242ddef7 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0a/75d9aac1dc84fb5aa51f7325c0ab53242ddef7 new file mode 100644 index 000000000..d5377341a Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0a/75d9aac1dc84fb5aa51f7325c0ab53242ddef7 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0c/fd6c54ef6532d862408f562309dc9c74a401e8 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0c/fd6c54ef6532d862408f562309dc9c74a401e8 new file mode 100644 index 000000000..40f628f89 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0c/fd6c54ef6532d862408f562309dc9c74a401e8 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0d/52e3a556e189ba0948ae56780918011c1b167d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0d/52e3a556e189ba0948ae56780918011c1b167d new file mode 100644 index 000000000..4b633e504 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0d/52e3a556e189ba0948ae56780918011c1b167d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0d/872f8e871a30208305978ecbf9e66d864f1638 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0d/872f8e871a30208305978ecbf9e66d864f1638 new file mode 100644 index 000000000..4cbc18e84 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0d/872f8e871a30208305978ecbf9e66d864f1638 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0e/c5f433959cd46177f745903353efb5be08d151 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0e/c5f433959cd46177f745903353efb5be08d151 new file mode 100644 index 000000000..1bee56c14 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0e/c5f433959cd46177f745903353efb5be08d151 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0f/3fc5dddc8964b9ac1040d0e957f9eb02d9efb3 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0f/3fc5dddc8964b9ac1040d0e957f9eb02d9efb3 new file mode 100644 index 000000000..d0ca42dad Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/0f/3fc5dddc8964b9ac1040d0e957f9eb02d9efb3 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/aeee27ac45a8402c2fd5b875d66dd844e5df00 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/aeee27ac45a8402c2fd5b875d66dd844e5df00 new file mode 100644 index 000000000..90e729f6d Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/aeee27ac45a8402c2fd5b875d66dd844e5df00 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/deab00b2d3a6f5a3073988ac050c2d7b6655e2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/deab00b2d3a6f5a3073988ac050c2d7b6655e2 new file mode 100644 index 000000000..857b23686 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/deab00b2d3a6f5a3073988ac050c2d7b6655e2 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/f4f3c08b737f5fd896cbefa1425ee63b21b2fa b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/f4f3c08b737f5fd896cbefa1425ee63b21b2fa new file mode 100644 index 000000000..6555194cb --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/11/f4f3c08b737f5fd896cbefa1425ee63b21b2fa @@ -0,0 +1 @@ +xQ D\fw)c^` ۴-Q/ơdb^ץjEDC$u> , z@8qjk<٩G>z2Lva2)Veŏ:%˜{A|Ǽ5K@mg9jY _;n,YyP \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/13/d1be4ea52a6ced1d7a1d832f0ee3c399348e5e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/13/d1be4ea52a6ced1d7a1d832f0ee3c399348e5e new file mode 100644 index 000000000..4e4e175e8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/13/d1be4ea52a6ced1d7a1d832f0ee3c399348e5e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/14/39088f509b79b1535b64193137d3ce4b240734 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/14/39088f509b79b1535b64193137d3ce4b240734 new file mode 100644 index 000000000..51ddf6dcb Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/14/39088f509b79b1535b64193137d3ce4b240734 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/15/8dc7bedb202f5b26502bf3574faa7f4238d56c b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/15/8dc7bedb202f5b26502bf3574faa7f4238d56c new file mode 100644 index 000000000..064423d0c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/15/8dc7bedb202f5b26502bf3574faa7f4238d56c @@ -0,0 +1,2 @@ +xK!D]sCboi2. bK*Eep73UӾ*NYYIԔ)jL:8<{NޓH6iDC"mqH!9Tm9>R^i.= +G'+~@@j+7أENsFt]7bN) \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/16/f825815cfd20a07a75c71554e82d8eede0b061 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/16/f825815cfd20a07a75c71554e82d8eede0b061 new file mode 100644 index 000000000..82d65253b --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/16/f825815cfd20a07a75c71554e82d8eede0b061 @@ -0,0 +1 @@ +xK!D]sObo hJqo6AJـT1h3'Lՠ.{ec,a`ZJT1#e+هJUi">\+ ץG_X6IvN;^bYgGMM \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/17/8940b450f238a56c0d75b7955cb57b38191982 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/17/8940b450f238a56c0d75b7955cb57b38191982 new file mode 100644 index 000000000..94e571e65 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/17/8940b450f238a56c0d75b7955cb57b38191982 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/18/3310e30fb1499af8c619108ffea4d300b5e778 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/18/3310e30fb1499af8c619108ffea4d300b5e778 new file mode 100644 index 000000000..1c4010d04 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/18/3310e30fb1499af8c619108ffea4d300b5e778 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/18/cb316b1cefa0f8a6946f0e201a8e1a6f845ab9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/18/cb316b1cefa0f8a6946f0e201a8e1a6f845ab9 new file mode 100644 index 000000000..30f3110f1 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/18/cb316b1cefa0f8a6946f0e201a8e1a6f845ab9 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/19/b7ac485269b672a101060894de3ba9c2a24dd1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/19/b7ac485269b672a101060894de3ba9c2a24dd1 new file mode 100644 index 000000000..e34ccb855 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/19/b7ac485269b672a101060894de3ba9c2a24dd1 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1a/010b1c0f081b2e8901d55307a15c29ff30af0e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1a/010b1c0f081b2e8901d55307a15c29ff30af0e new file mode 100644 index 000000000..6039df00e Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1a/010b1c0f081b2e8901d55307a15c29ff30af0e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1c/51d885170f57a0c4e8c69ff6363d91a5b51f85 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1c/51d885170f57a0c4e8c69ff6363d91a5b51f85 new file mode 100644 index 000000000..9a21e26c0 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1c/51d885170f57a0c4e8c69ff6363d91a5b51f85 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1c/ff9ec6a47a537380dedfdd17c9e76d74259a2b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1c/ff9ec6a47a537380dedfdd17c9e76d74259a2b new file mode 100644 index 000000000..30802bcec Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1c/ff9ec6a47a537380dedfdd17c9e76d74259a2b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1e/4ff029aee68d0d69ef9eb6efa6cbf1ec732f99 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1e/4ff029aee68d0d69ef9eb6efa6cbf1ec732f99 new file mode 100644 index 000000000..5183b8360 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1e/4ff029aee68d0d69ef9eb6efa6cbf1ec732f99 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1f/81433e3161efbf250576c58fede7f6b836f3d3 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1f/81433e3161efbf250576c58fede7f6b836f3d3 new file mode 100644 index 000000000..970855675 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/1f/81433e3161efbf250576c58fede7f6b836f3d3 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/20/91d94c8bd3eb0835dc5220de5e8bb310fa1513 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/20/91d94c8bd3eb0835dc5220de5e8bb310fa1513 new file mode 100644 index 000000000..a843890c0 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/20/91d94c8bd3eb0835dc5220de5e8bb310fa1513 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/21/671e290278286fb2ce4c63d01699b67adce331 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/21/671e290278286fb2ce4c63d01699b67adce331 new file mode 100644 index 000000000..b656d0001 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/21/671e290278286fb2ce4c63d01699b67adce331 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/22/7792b52aaa0b238bea00ec7e509b02623f168c b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/22/7792b52aaa0b238bea00ec7e509b02623f168c new file mode 100644 index 000000000..3bb19bb77 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/22/7792b52aaa0b238bea00ec7e509b02623f168c differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/3c0919c998ed110a4b6ff36f353aec8b713487 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/3c0919c998ed110a4b6ff36f353aec8b713487 new file mode 100644 index 000000000..d0c8c9e1d Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/3c0919c998ed110a4b6ff36f353aec8b713487 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/92a2dacc9efb562b8635d6579fb458751c7c5b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/92a2dacc9efb562b8635d6579fb458751c7c5b new file mode 100644 index 000000000..86127a344 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/92a2dacc9efb562b8635d6579fb458751c7c5b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/ed141a6ae1e798b2f721afedbe947c119111ba b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/ed141a6ae1e798b2f721afedbe947c119111ba new file mode 100644 index 000000000..06dee3b23 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/23/ed141a6ae1e798b2f721afedbe947c119111ba differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/1a1005cd9b980732741b74385b891142bcba28 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/1a1005cd9b980732741b74385b891142bcba28 new file mode 100644 index 000000000..9b65f666f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/1a1005cd9b980732741b74385b891142bcba28 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/2591eb280ee9eeb2ce63524b9a8b9bc4cb515d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/2591eb280ee9eeb2ce63524b9a8b9bc4cb515d new file mode 100644 index 000000000..74a01373f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/2591eb280ee9eeb2ce63524b9a8b9bc4cb515d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/90b9f1a079420870027deefb49f51d6656cf74 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/90b9f1a079420870027deefb49f51d6656cf74 new file mode 100644 index 000000000..60497caa5 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/24/90b9f1a079420870027deefb49f51d6656cf74 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/25/9d08ca43af9200e9ea9a098e44a5a350ebd9b3 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/25/9d08ca43af9200e9ea9a098e44a5a350ebd9b3 new file mode 100644 index 000000000..2bae66998 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/25/9d08ca43af9200e9ea9a098e44a5a350ebd9b3 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/25/c40b7660c08c8fb581f770312f41b9b03119d1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/25/c40b7660c08c8fb581f770312f41b9b03119d1 new file mode 100644 index 000000000..185214727 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/25/c40b7660c08c8fb581f770312f41b9b03119d1 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/26/153a3ff3649b6c2bb652d3f06878c6e0a172f9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/26/153a3ff3649b6c2bb652d3f06878c6e0a172f9 new file mode 100644 index 000000000..4fcaa07e2 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/26/153a3ff3649b6c2bb652d3f06878c6e0a172f9 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/27/133da702ba3c60af2a01e96c2555ff4045d692 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/27/133da702ba3c60af2a01e96c2555ff4045d692 new file mode 100644 index 000000000..08e61f844 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/27/133da702ba3c60af2a01e96c2555ff4045d692 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/27/4bbe983022fb4c02f8a2bf2ebe8da4fe130054 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/27/4bbe983022fb4c02f8a2bf2ebe8da4fe130054 new file mode 100644 index 000000000..c7afad2a8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/27/4bbe983022fb4c02f8a2bf2ebe8da4fe130054 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/0de5dc27505dcdd83a75c8bf1fcd9462cd7add b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/0de5dc27505dcdd83a75c8bf1fcd9462cd7add new file mode 100644 index 000000000..a95f926f8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/0de5dc27505dcdd83a75c8bf1fcd9462cd7add differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/5f1f181ee3b58ea751f5dd5d8f9b445520a136 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/5f1f181ee3b58ea751f5dd5d8f9b445520a136 new file mode 100644 index 000000000..d24231eda Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/5f1f181ee3b58ea751f5dd5d8f9b445520a136 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/d0a343aeef7a2cf0d158478966a6e587ff3863 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/d0a343aeef7a2cf0d158478966a6e587ff3863 new file mode 100644 index 000000000..d10ca636b Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/d0a343aeef7a2cf0d158478966a6e587ff3863 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/fdd7e1b6c6ae993f23dfe8e84a8e06a772fa2a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/fdd7e1b6c6ae993f23dfe8e84a8e06a772fa2a new file mode 100644 index 000000000..c86edfb68 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2b/fdd7e1b6c6ae993f23dfe8e84a8e06a772fa2a differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2d/a538570bc1e5b2c3e855bf702f35248ad0735f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2d/a538570bc1e5b2c3e855bf702f35248ad0735f new file mode 100644 index 000000000..83253f81c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2d/a538570bc1e5b2c3e855bf702f35248ad0735f @@ -0,0 +1,2 @@ +xK +1D]N"n{t:L$ UEQ>~7:L D [5ɇ,y2eT@z*.([žunum_|Št@ +apg%haJYծA8թ훠fN4;h[%cOuJWyΏ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2f/598248eeccfc27e5ca44d9d96383f6dfea7b16 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2f/598248eeccfc27e5ca44d9d96383f6dfea7b16 new file mode 100644 index 000000000..1d9f226e2 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/2f/598248eeccfc27e5ca44d9d96383f6dfea7b16 @@ -0,0 +1 @@ +x+)JMU067c040031QH,-M-JOMLI+(aH:,:C: o>ZC'g$楧f&%%g5qYeZokM2ԐX\ZDPC~^ZNfrIf^:XZHي1O(_,' jvQjn~13zדm9Wu]:$I{| 2mg˾15ӿ,\})TC)0Pavz֛9MՅ'6b \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/31/68dca1a561889b045a6441909f4c56145e666d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/31/68dca1a561889b045a6441909f4c56145e666d new file mode 100644 index 000000000..2de1c5a79 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/31/68dca1a561889b045a6441909f4c56145e666d @@ -0,0 +1,2 @@ +xQ +0D)rJMxMHz}xfރaRYipkUD $1fQ2q-=Y3R76ġg9e7 bw GJe*˽ |ůSY"5&Нƨng9Z3_;kdO \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/31/d5472536041a83d986829240bbbdc897c6f8a6 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/31/d5472536041a83d986829240bbbdc897c6f8a6 new file mode 100644 index 000000000..5ec5acb59 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/31/d5472536041a83d986829240bbbdc897c6f8a6 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/32/21dd512b7e2dc4b5bd03046df6c81b2ab2070b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/32/21dd512b7e2dc4b5bd03046df6c81b2ab2070b new file mode 100644 index 000000000..d36138d79 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/32/21dd512b7e2dc4b5bd03046df6c81b2ab2070b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/33/46d64325b39e5323733492cd55f808994a2475 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/33/46d64325b39e5323733492cd55f808994a2475 new file mode 100644 index 000000000..11546cea4 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/33/46d64325b39e5323733492cd55f808994a2475 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/33/d500f588fbbe65901d82b4e6b008e549064be0 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/33/d500f588fbbe65901d82b4e6b008e549064be0 new file mode 100644 index 000000000..061a031b6 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/33/d500f588fbbe65901d82b4e6b008e549064be0 @@ -0,0 +1,2 @@ +xA E]s +.hbo.Z x}[ ~kCA<:km`d̑d,!:𦐳P1P qHccHEO[zsK>y>隿ïm6*Rn>O \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/34/8dcd41e2b467991578e92bedd16971b877ef1e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/34/8dcd41e2b467991578e92bedd16971b877ef1e new file mode 100644 index 000000000..fd61b6ce5 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/34/8dcd41e2b467991578e92bedd16971b877ef1e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/34/bfafff88eaf118402b44e6f3e2dbbf1a582b05 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/34/bfafff88eaf118402b44e6f3e2dbbf1a582b05 new file mode 100644 index 000000000..c653cec50 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/34/bfafff88eaf118402b44e6f3e2dbbf1a582b05 @@ -0,0 +1 @@ +xKj1D) >`7A. $<`Morlm4G&dVd[j2JCъgu_Gu%2:3XزQ'";?wpkm׾&Pf! %QJ%:Cez=6q;iO \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/0c6eb3010efc403a6bed682332635314e9ed58 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/0c6eb3010efc403a6bed682332635314e9ed58 new file mode 100644 index 000000000..2eee60233 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/0c6eb3010efc403a6bed682332635314e9ed58 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/411bfb77cd2cc431f3a03a2b4976ed94b5d241 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/411bfb77cd2cc431f3a03a2b4976ed94b5d241 new file mode 100644 index 000000000..ea024ccd9 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/411bfb77cd2cc431f3a03a2b4976ed94b5d241 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/4704d3613ad4228e4786fc76656b11e98236c4 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/4704d3613ad4228e4786fc76656b11e98236c4 new file mode 100644 index 000000000..1dd13c44a Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/4704d3613ad4228e4786fc76656b11e98236c4 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/632e43612c06a3ea924bfbacd48333da874c29 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/632e43612c06a3ea924bfbacd48333da874c29 new file mode 100644 index 000000000..be7684f19 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/632e43612c06a3ea924bfbacd48333da874c29 @@ -0,0 +1 @@ +xN !LdMb60^,40;iUFf+)1vB939fG(DIݸʵA$sk]l|L{Ig$m.N5y.\a/]|Ʋ@[g4< Hl?gTsˠzCP \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/75826c96a975031d2c14368529cc5c4353a8fd b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/75826c96a975031d2c14368529cc5c4353a8fd new file mode 100644 index 000000000..24e33bc41 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/35/75826c96a975031d2c14368529cc5c4353a8fd differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/36/219b49367146cb2e6a1555b5a9ebd4d0328495 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/36/219b49367146cb2e6a1555b5a9ebd4d0328495 new file mode 100644 index 000000000..7f8044372 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/36/219b49367146cb2e6a1555b5a9ebd4d0328495 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/36/4bbe4ce80c7bd31e6307dce77d46e3e1759fb3 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/36/4bbe4ce80c7bd31e6307dce77d46e3e1759fb3 new file mode 100644 index 000000000..90fd9651f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/36/4bbe4ce80c7bd31e6307dce77d46e3e1759fb3 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/37/48859b001c6e627e712a07951aee40afd19b41 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/37/48859b001c6e627e712a07951aee40afd19b41 new file mode 100644 index 000000000..6a0c389e4 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/37/48859b001c6e627e712a07951aee40afd19b41 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/38/5c8a0f26ddf79e9041e15e17dc352ed2c4cced b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/38/5c8a0f26ddf79e9041e15e17dc352ed2c4cced new file mode 100644 index 000000000..e95ff3a88 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/38/5c8a0f26ddf79e9041e15e17dc352ed2c4cced @@ -0,0 +1,2 @@ +x-MK +1 uSYRą6C6뛪oknYt Ep iDCddLB+8%qk +e6fHB1J4F1l \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3b/47b031b3e55ae11e14a05260b1c3ffd6838d55 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3b/47b031b3e55ae11e14a05260b1c3ffd6838d55 new file mode 100644 index 000000000..82086466f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3b/47b031b3e55ae11e14a05260b1c3ffd6838d55 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3b/bf0bf59b20df5d5fc58b9fc1dc07be637c301f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3b/bf0bf59b20df5d5fc58b9fc1dc07be637c301f new file mode 100644 index 000000000..723a9ae4c Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3b/bf0bf59b20df5d5fc58b9fc1dc07be637c301f differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3e/f4d30382ca33fdeba9fda895a99e0891ba37aa b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3e/f4d30382ca33fdeba9fda895a99e0891ba37aa new file mode 100644 index 000000000..49ee15239 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3e/f4d30382ca33fdeba9fda895a99e0891ba37aa differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3e/f9bfe82f9635518ae89152322f3b46fd4ba25b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3e/f9bfe82f9635518ae89152322f3b46fd4ba25b new file mode 100644 index 000000000..3b5998ca6 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/3e/f9bfe82f9635518ae89152322f3b46fd4ba25b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/40/2784a46a4a3982294231594cbeb431f506d22c b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/40/2784a46a4a3982294231594cbeb431f506d22c new file mode 100644 index 000000000..a17e05d0f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/40/2784a46a4a3982294231594cbeb431f506d22c differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/41/2b32fb66137366147f1801ecc962452757d48a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/41/2b32fb66137366147f1801ecc962452757d48a new file mode 100644 index 000000000..b183dd782 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/41/2b32fb66137366147f1801ecc962452757d48a @@ -0,0 +1,2 @@ +xK +1D]IO>"nt:x}xwUxjum'뫈.9=y 6$@T8&Lhf4Aܻf0B(.K>9S< +z_f}]Z]eO:wzރP.ިaNU6O \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/42/18670ab81cc219a9f94befb5c5dad90ec52648 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/42/18670ab81cc219a9f94befb5c5dad90ec52648 new file mode 100644 index 000000000..33ead6112 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/42/18670ab81cc219a9f94befb5c5dad90ec52648 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/43/aafd43bea779ec74317dc361f45ae3f532a505 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/43/aafd43bea779ec74317dc361f45ae3f532a505 new file mode 100644 index 000000000..ac86823b6 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/43/aafd43bea779ec74317dc361f45ae3f532a505 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/43/c338656342227a3a3cd3aa85cbf784061f5425 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/43/c338656342227a3a3cd3aa85cbf784061f5425 new file mode 100644 index 000000000..d9773118b Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/43/c338656342227a3a3cd3aa85cbf784061f5425 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/45/299c1ca5e07bba1fd90843056fb559f96b1f5a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/45/299c1ca5e07bba1fd90843056fb559f96b1f5a new file mode 100644 index 000000000..2093b4410 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/45/299c1ca5e07bba1fd90843056fb559f96b1f5a differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/46/6daf8552b891e5c22bc58c9d7fc1a2eb8f0289 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/46/6daf8552b891e5c22bc58c9d7fc1a2eb8f0289 new file mode 100644 index 000000000..c39b53aa8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/46/6daf8552b891e5c22bc58c9d7fc1a2eb8f0289 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/47/6dbb3e207313d1d8aaa120c6ad204bf1295e53 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/47/6dbb3e207313d1d8aaa120c6ad204bf1295e53 new file mode 100644 index 000000000..3e5f66e55 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/47/6dbb3e207313d1d8aaa120c6ad204bf1295e53 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/47/8172cb2f5ff9b514bc9d04d3bd5ef5840cb3b2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/47/8172cb2f5ff9b514bc9d04d3bd5ef5840cb3b2 new file mode 100644 index 000000000..d9e250e66 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/47/8172cb2f5ff9b514bc9d04d3bd5ef5840cb3b2 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/130a28ef567af9a6a6104c38773fedfa5f9742 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/130a28ef567af9a6a6104c38773fedfa5f9742 new file mode 100644 index 000000000..e2c49f5c4 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/130a28ef567af9a6a6104c38773fedfa5f9742 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/9df817155e4bdd3c6ee192a72c52f481818230 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/9df817155e4bdd3c6ee192a72c52f481818230 new file mode 100644 index 000000000..9c7e471dd Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/9df817155e4bdd3c6ee192a72c52f481818230 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/fd9edac79d15c8fbfca2d481cbb900beba22a6 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/fd9edac79d15c8fbfca2d481cbb900beba22a6 new file mode 100644 index 000000000..d808d9fd9 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/49/fd9edac79d15c8fbfca2d481cbb900beba22a6 @@ -0,0 +1,3 @@ +xU +0D=+ +f5dI~Ehe3x2?ذ$Ɂ%+"SRAWRm Kn\t XZ/hMƱߙg2j># \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4a/9550ebcc97ce22b22f45af7b829bb030d003f5 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4a/9550ebcc97ce22b22f45af7b829bb030d003f5 new file mode 100644 index 000000000..6ec674adc Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4a/9550ebcc97ce22b22f45af7b829bb030d003f5 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/253da36a0ae8bfce63aeabd8c5b58429925594 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/253da36a0ae8bfce63aeabd8c5b58429925594 new file mode 100644 index 000000000..1a4072794 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/253da36a0ae8bfce63aeabd8c5b58429925594 @@ -0,0 +1,2 @@ +x A +0 @AAILm l׹vGx#63tW B6%h \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/48deed3a433909bfd6b6ab3d4b91348b6af464 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/48deed3a433909bfd6b6ab3d4b91348b6af464 new file mode 100644 index 000000000..328c8506e Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/48deed3a433909bfd6b6ab3d4b91348b6af464 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 new file mode 100644 index 000000000..adf64119a Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4c/9fac0707f8d4195037ae5a681aa48626491541 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4c/9fac0707f8d4195037ae5a681aa48626491541 new file mode 100644 index 000000000..6b8c85e2b Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4c/9fac0707f8d4195037ae5a681aa48626491541 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4c/a408a8c88655f7586a1b580be6fad138121e98 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4c/a408a8c88655f7586a1b580be6fad138121e98 new file mode 100644 index 000000000..15cb7f29a Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4c/a408a8c88655f7586a1b580be6fad138121e98 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/0d9401aee78eb345a8685a859d37c8c3c0bbed b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/0d9401aee78eb345a8685a859d37c8c3c0bbed new file mode 100644 index 000000000..57f7eb68c Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/0d9401aee78eb345a8685a859d37c8c3c0bbed differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/886e602529caa9ab11d71f86634bd1b6e0de10 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/886e602529caa9ab11d71f86634bd1b6e0de10 new file mode 100644 index 000000000..53168a038 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/886e602529caa9ab11d71f86634bd1b6e0de10 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/b04c9e79e88f6640d01ff5b25ca2a60764f216 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/b04c9e79e88f6640d01ff5b25ca2a60764f216 new file mode 100644 index 000000000..f4ec0efec Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4e/b04c9e79e88f6640d01ff5b25ca2a60764f216 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4f/e93c0ec83eb6305cbace3dace88ecee1b63cb6 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4f/e93c0ec83eb6305cbace3dace88ecee1b63cb6 new file mode 100644 index 000000000..67dc6842f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/4f/e93c0ec83eb6305cbace3dace88ecee1b63cb6 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/12fd565b1393bdfda1805d4ec38ce6619e1fd1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/12fd565b1393bdfda1805d4ec38ce6619e1fd1 new file mode 100644 index 000000000..d629a23a1 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/12fd565b1393bdfda1805d4ec38ce6619e1fd1 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/4f75ac95a71ef98051817618576a68505b92f9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/4f75ac95a71ef98051817618576a68505b92f9 new file mode 100644 index 000000000..1b24c721a Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/4f75ac95a71ef98051817618576a68505b92f9 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/84fc2a88b6bdba8db93bd3953a8f4fdb470238 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/84fc2a88b6bdba8db93bd3953a8f4fdb470238 new file mode 100644 index 000000000..84c9987ce Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/84fc2a88b6bdba8db93bd3953a8f4fdb470238 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/ce7d7d01217679e26c55939eef119e0c93e272 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/ce7d7d01217679e26c55939eef119e0c93e272 new file mode 100644 index 000000000..e2f9f67fd Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/50/ce7d7d01217679e26c55939eef119e0c93e272 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/51/95a1b480f66691b667f10a9e41e70115a78351 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/51/95a1b480f66691b667f10a9e41e70115a78351 new file mode 100644 index 000000000..088ee5498 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/51/95a1b480f66691b667f10a9e41e70115a78351 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/52/d8bc572af2b6d4ee0d5e62ed5d1fbad92210a9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/52/d8bc572af2b6d4ee0d5e62ed5d1fbad92210a9 new file mode 100644 index 000000000..6522209bd --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/52/d8bc572af2b6d4ee0d5e62ed5d1fbad92210a9 @@ -0,0 +1,3 @@ +x] +0})rnD|^`Ђm$FUo3ä,sӽ]" #b"1 9cThS//SYe'+~mrh\cQwFMQϙ]b5M R \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/53/825f41ac8d640612f9423a2f03a69f3d96809a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/53/825f41ac8d640612f9423a2f03a69f3d96809a new file mode 100644 index 000000000..08cb0b66f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/53/825f41ac8d640612f9423a2f03a69f3d96809a differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/269b3f6ec3d7d4ede24dd350dd5d605495c3ae b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/269b3f6ec3d7d4ede24dd350dd5d605495c3ae new file mode 100644 index 000000000..4a2415339 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/269b3f6ec3d7d4ede24dd350dd5d605495c3ae @@ -0,0 +1,2 @@ +xK +1D]I7 LӌL$FxwUAQj m'؍^v9 d- Ɯ \ ϽC'&`"Ĺ(֡9_sg}]Z}UF?\I&@mt;;ʟ3hzN \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/59c89aa0026d543ce8343bd89871bce543f9c2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/59c89aa0026d543ce8343bd89871bce543f9c2 new file mode 100644 index 000000000..178b833e8 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/59c89aa0026d543ce8343bd89871bce543f9c2 @@ -0,0 +1,3 @@ +x !D +,,,,9O bl؁3%mY.C[LEtd`\ %aBH%TvB G%Qphq]nCgP3B(H14yS)W;IVsT^܋>myJ?(_kܖ6-$#-Zzvȟ3 +:NqMB \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/7607c690372fe81fab8e3bb44c530e129118fd b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/7607c690372fe81fab8e3bb44c530e129118fd new file mode 100644 index 000000000..dccd22006 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/54/7607c690372fe81fab8e3bb44c530e129118fd differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/55/b4e4687e7a0d9ca367016ed930f385d4022e6f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/55/b4e4687e7a0d9ca367016ed930f385d4022e6f new file mode 100644 index 000000000..fb157a214 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/55/b4e4687e7a0d9ca367016ed930f385d4022e6f @@ -0,0 +1 @@ +xQj0DSZvJ \N 7㷱d-{LX' vm*{Z`$U9-TN{,}Kyuۣ78A_Sv.EQgSsxZZX MNRi \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/56/6ab53c220a2eafc1212af1a024513230280ab9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/56/6ab53c220a2eafc1212af1a024513230280ab9 new file mode 100644 index 000000000..a8855ae67 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/56/6ab53c220a2eafc1212af1a024513230280ab9 @@ -0,0 +1,3 @@ +x !D +,˱1؁ ,LD bl؁3%Ihft ١XvY`L2М՝܆NsIbRЧL3Ra$Is,S~qh7~QvՃ6!-Zzvȟ3 +:9M& \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/56/a638b76b75e068590ac999c2f8621e7f3e264c b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/56/a638b76b75e068590ac999c2f8621e7f3e264c new file mode 100644 index 000000000..36289bf7a --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/56/a638b76b75e068590ac999c2f8621e7f3e264c @@ -0,0 +1 @@ +xAj!Eu vuWB6s%6qΐ$^Rb[{=coj'|褯UjeKLnn5СPY|2`zzQ{ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/57/079a46233ae2b6df62e9ade71c4948512abefb b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/57/079a46233ae2b6df62e9ade71c4948512abefb new file mode 100644 index 000000000..c7eabc46b Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/57/079a46233ae2b6df62e9ade71c4948512abefb differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/43febcb23480df0b5edb22a21c59c772bb8e29 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/43febcb23480df0b5edb22a21c59c772bb8e29 new file mode 100644 index 000000000..f6b2a2bfe Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/43febcb23480df0b5edb22a21c59c772bb8e29 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/87a5e516c53bd58efb0f02ec6aa031b6fe9ad7 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/87a5e516c53bd58efb0f02ec6aa031b6fe9ad7 new file mode 100644 index 000000000..550d288d4 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/87a5e516c53bd58efb0f02ec6aa031b6fe9ad7 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/e853f66699fd02629fd50bde08082bc005933a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/e853f66699fd02629fd50bde08082bc005933a new file mode 100644 index 000000000..cf6db633c Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/58/e853f66699fd02629fd50bde08082bc005933a differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/59/6803b523203a4851c824c07366906f8353f4ad b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/59/6803b523203a4851c824c07366906f8353f4ad new file mode 100644 index 000000000..cbc8cbef3 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/59/6803b523203a4851c824c07366906f8353f4ad differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/2411f8075f48a6b2fdb85ebc0d371747c4df15 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/2411f8075f48a6b2fdb85ebc0d371747c4df15 new file mode 100644 index 000000000..7b41413da Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/2411f8075f48a6b2fdb85ebc0d371747c4df15 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/341ead2ba6f2af98ce5ec3fe84f6b6d2899c0d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/341ead2ba6f2af98ce5ec3fe84f6b6d2899c0d new file mode 100644 index 000000000..63c86bd33 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/341ead2ba6f2af98ce5ec3fe84f6b6d2899c0d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/3b68a71fc4fa5d362fd3875e53137c6a5ab7a5 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/3b68a71fc4fa5d362fd3875e53137c6a5ab7a5 new file mode 100644 index 000000000..541001456 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5c/3b68a71fc4fa5d362fd3875e53137c6a5ab7a5 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5d/c1018e90b19654bee986b7a0c268804d39659d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5d/c1018e90b19654bee986b7a0c268804d39659d new file mode 100644 index 000000000..7500b9914 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5d/c1018e90b19654bee986b7a0c268804d39659d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5d/dd0fe66f990dc0e5cf9fec6d9b465240e9537f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5d/dd0fe66f990dc0e5cf9fec6d9b465240e9537f new file mode 100644 index 000000000..9d8691eb2 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5d/dd0fe66f990dc0e5cf9fec6d9b465240e9537f differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5e/b7bb6a146eb3c7fd3990b240a2308eceb1cf8d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5e/b7bb6a146eb3c7fd3990b240a2308eceb1cf8d new file mode 100644 index 000000000..aca2666cf Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5e/b7bb6a146eb3c7fd3990b240a2308eceb1cf8d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5f/bfbdc04b4eca46f54f4853a3c5a1dce28f5165 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5f/bfbdc04b4eca46f54f4853a3c5a1dce28f5165 new file mode 100644 index 000000000..aec3867c8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/5f/bfbdc04b4eca46f54f4853a3c5a1dce28f5165 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/60/61fe116ecba0800c26113ea1a7dfac2e16eeaf b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/60/61fe116ecba0800c26113ea1a7dfac2e16eeaf new file mode 100644 index 000000000..3f266f6df Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/60/61fe116ecba0800c26113ea1a7dfac2e16eeaf differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/60/91fc2c036a382a69489e3f518ee5aae9a4e567 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/60/91fc2c036a382a69489e3f518ee5aae9a4e567 new file mode 100644 index 000000000..fa63afba1 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/60/91fc2c036a382a69489e3f518ee5aae9a4e567 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/61/340eeed7340fa6a8792def9a5938bb5d4434bb b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/61/340eeed7340fa6a8792def9a5938bb5d4434bb new file mode 100644 index 000000000..e830cafe5 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/61/340eeed7340fa6a8792def9a5938bb5d4434bb differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/61/78885b38fe96e825ac0f492c0a941f288b37f6 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/61/78885b38fe96e825ac0f492c0a941f288b37f6 new file mode 100644 index 000000000..bedc5f27e Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/61/78885b38fe96e825ac0f492c0a941f288b37f6 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/12c31dab5e482247d7977e4f0dd3601decf13b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/12c31dab5e482247d7977e4f0dd3601decf13b new file mode 100644 index 000000000..b6f0607bb Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/12c31dab5e482247d7977e4f0dd3601decf13b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/269111c3b02a9355badcb9da8678b1bf41787b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/269111c3b02a9355badcb9da8678b1bf41787b new file mode 100644 index 000000000..0edf65994 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/269111c3b02a9355badcb9da8678b1bf41787b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/33c6a0670228627f93c01cef32485a30403670 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/33c6a0670228627f93c01cef32485a30403670 new file mode 100644 index 000000000..81428dd62 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/33c6a0670228627f93c01cef32485a30403670 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/c4f6533c9a3894191fdcb96a3be935ade63f1a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/c4f6533c9a3894191fdcb96a3be935ade63f1a new file mode 100644 index 000000000..c0f822d2c Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/62/c4f6533c9a3894191fdcb96a3be935ade63f1a differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/63/247125386de9ec90a27ad36169307bf8a11a38 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/63/247125386de9ec90a27ad36169307bf8a11a38 new file mode 100644 index 000000000..bc2d7384d --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/63/247125386de9ec90a27ad36169307bf8a11a38 @@ -0,0 +1 @@ +xݏ;1 D}AV\8HIVp|?LyOuN7C] ͥlt:iA(xip,O;o7 UYZ Bý]dUmyk[cͥ)!X{Z \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/67/110d77886b2af6309b9212961e72b8583e5fa9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/67/110d77886b2af6309b9212961e72b8583e5fa9 new file mode 100644 index 000000000..877bad703 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/67/110d77886b2af6309b9212961e72b8583e5fa9 @@ -0,0 +1 @@ +x=N1 ^r !J:.`'lP^gT343Ҕup*Z %l4irHz,곥[M]aJҐb5l8OX$XճEa")U$d2zODŽų>m'qZ渍O`lFO1!n'=-]A&e˯^o^ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/67/18a45909532d1fcf5600d0877f7fe7e78f0b86 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/67/18a45909532d1fcf5600d0877f7fe7e78f0b86 new file mode 100644 index 000000000..ffda698f0 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/67/18a45909532d1fcf5600d0877f7fe7e78f0b86 @@ -0,0 +1 @@ +xM1 DNi`ǹDB~ǧ]ݠY74M8J?$_k[Q,"Zz˟39 LO \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/76/63fce0130db092936b137cabd693ec234eb060 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/76/63fce0130db092936b137cabd693ec234eb060 new file mode 100644 index 000000000..f578a4a68 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/76/63fce0130db092936b137cabd693ec234eb060 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/76/ab0e2868197ec158ddd6c78d8a0d2fd73d38f9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/76/ab0e2868197ec158ddd6c78d8a0d2fd73d38f9 new file mode 100644 index 000000000..4d41ad8cd Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/76/ab0e2868197ec158ddd6c78d8a0d2fd73d38f9 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7a/a3edf2bcfee22398e6b55295aa56366b7aaf76 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7a/a3edf2bcfee22398e6b55295aa56366b7aaf76 new file mode 100644 index 000000000..09f1e4d3a Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7a/a3edf2bcfee22398e6b55295aa56366b7aaf76 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7a/f14d9c679baaef35555095f4f5d33e9a569ab9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7a/f14d9c679baaef35555095f4f5d33e9a569ab9 new file mode 100644 index 000000000..b4c4ef734 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7a/f14d9c679baaef35555095f4f5d33e9a569ab9 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/04ca611203ed320c5f495b9813054dd23be3be b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/04ca611203ed320c5f495b9813054dd23be3be new file mode 100644 index 000000000..e3ba6056d --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/04ca611203ed320c5f495b9813054dd23be3be @@ -0,0 +1,2 @@ +xQ D{ -,tc^`%b(K|ͼd&k)Dsl<f4a1B8zsCvŘEQdO>E񧯵#}%xu z{yV%rɐdžp֨tDŽ +UrL \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/2c5228c9e90170d4a35e6558e47163daf092e5 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/2c5228c9e90170d4a35e6558e47163daf092e5 new file mode 100644 index 000000000..52fde92a1 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/2c5228c9e90170d4a35e6558e47163daf092e5 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/b63eed597130ba4abb87b3e544b85021905520 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/b63eed597130ba4abb87b3e544b85021905520 new file mode 100644 index 000000000..769f29c6e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7c/b63eed597130ba4abb87b3e544b85021905520 @@ -0,0 +1,3 @@ +xK +1D]t'"nH:L$FxwUAQܖ6f7IT*zJ +1#;@rX]ꞺC3A F'aj#Tf acn]_+s[mG'+~m9i PFCQge"N \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7e/2d058d5fedf8329db44db4fac610d6b1a89159 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7e/2d058d5fedf8329db44db4fac610d6b1a89159 new file mode 100644 index 000000000..d12d7b4a7 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7e/2d058d5fedf8329db44db4fac610d6b1a89159 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7f/7a2da58126226986d71c6ddfab4afba693280d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7f/7a2da58126226986d71c6ddfab4afba693280d new file mode 100644 index 000000000..2f833c292 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/7f/7a2da58126226986d71c6ddfab4afba693280d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/80/a8fbb3abb1ba423d554e9630b8fc2e5698f86b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/80/a8fbb3abb1ba423d554e9630b8fc2e5698f86b new file mode 100644 index 000000000..3daf6c3e0 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/80/a8fbb3abb1ba423d554e9630b8fc2e5698f86b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/81/1c70fcb6d5bbd022d04cc31836d30b436f9551 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/81/1c70fcb6d5bbd022d04cc31836d30b436f9551 new file mode 100644 index 000000000..6d8702404 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/81/1c70fcb6d5bbd022d04cc31836d30b436f9551 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/81/87117062b750eed4f93fd7e899f17b52ce554d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/81/87117062b750eed4f93fd7e899f17b52ce554d new file mode 100644 index 000000000..19cac9faf Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/81/87117062b750eed4f93fd7e899f17b52ce554d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/07d93a155903a5c49576583f0ce1f6ff897c0e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/07d93a155903a5c49576583f0ce1f6ff897c0e new file mode 100644 index 000000000..5a96a4e4e Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/07d93a155903a5c49576583f0ce1f6ff897c0e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/6b8b82b26cab22eaaed8820877c76d6c8bca19 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/6b8b82b26cab22eaaed8820877c76d6c8bca19 new file mode 100644 index 000000000..99f828649 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/6b8b82b26cab22eaaed8820877c76d6c8bca19 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/824a8c6658768e2013905219cc8c64cc3d9a2e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/824a8c6658768e2013905219cc8c64cc3d9a2e new file mode 100644 index 000000000..066190fb8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/83/824a8c6658768e2013905219cc8c64cc3d9a2e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/84/9619b03ae540acee4d1edec96b86993da6b497 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/84/9619b03ae540acee4d1edec96b86993da6b497 new file mode 100644 index 000000000..67271ac50 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/84/9619b03ae540acee4d1edec96b86993da6b497 @@ -0,0 +1,3 @@ +xK +1D]v7t3L$ UEVZC'g$楧f&%%g5qYeZokM2ԐX\ZDPC~^ZNfrIf^:XZHي1O(_,' jv^j9!Ɖ9%`<sBާHrS3d Ң2 wI{| 2mg˾15ӿ,\})TC)00avʉz֛9MՅ'6bG \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/095d8fd01594f4d14454d073e3ac57b9ce485f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/095d8fd01594f4d14454d073e3ac57b9ce485f new file mode 100644 index 000000000..4ec013881 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/095d8fd01594f4d14454d073e3ac57b9ce485f differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/5b53cb2aa9ceb1139f5312fcfa3cc3c5a47c9a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/5b53cb2aa9ceb1139f5312fcfa3cc3c5a47c9a new file mode 100644 index 000000000..f4249c23d --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/5b53cb2aa9ceb1139f5312fcfa3cc3c5a47c9a @@ -0,0 +1 @@ +x퐱 0 S{"2d,0^?&SH[8눪E`фrZ*drl, cbF/'gв \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/7cd60d49ce3a1a770ece43b7d29b5cf462a33a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/7cd60d49ce3a1a770ece43b7d29b5cf462a33a new file mode 100644 index 000000000..790750c0f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/7cd60d49ce3a1a770ece43b7d29b5cf462a33a differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/fb012a6d809e499bd8d3e194a3929bc8995b93 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/fb012a6d809e499bd8d3e194a3929bc8995b93 new file mode 100644 index 000000000..a90ee08ce Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8b/fb012a6d809e499bd8d3e194a3929bc8995b93 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8c/749d9968d4b10dcfb06c9f97d0e5d92d337071 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8c/749d9968d4b10dcfb06c9f97d0e5d92d337071 new file mode 100644 index 000000000..e42393cf7 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8c/749d9968d4b10dcfb06c9f97d0e5d92d337071 @@ -0,0 +1,2 @@ +xAB!C]s +.acxf`|_ bh5m^mzL`}$26#"8`s.`ԝܺ.!bH\< i",K8ٗ_X>MeЏ:7]AC40뭙Q]Q\.,VO \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8f/4433f8593ddd65b7dd43dd4564d841f4d9c8aa b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8f/4433f8593ddd65b7dd43dd4564d841f4d9c8aa new file mode 100644 index 000000000..d2de777cc Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/8f/4433f8593ddd65b7dd43dd4564d841f4d9c8aa differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/90/a336c7dacbe295159413559b0043b8bdc60d57 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/90/a336c7dacbe295159413559b0043b8bdc60d57 new file mode 100644 index 000000000..35453ebfd Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/90/a336c7dacbe295159413559b0043b8bdc60d57 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/2b2d7819cf9c1029e414883857ed61d597a1a5 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/2b2d7819cf9c1029e414883857ed61d597a1a5 new file mode 100644 index 000000000..d5df393e9 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/2b2d7819cf9c1029e414883857ed61d597a1a5 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/8bb3e09090a9995d48af9a2a6296d7e6088d1c b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/8bb3e09090a9995d48af9a2a6296d7e6088d1c new file mode 100644 index 000000000..c214ab206 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/8bb3e09090a9995d48af9a2a6296d7e6088d1c differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/f44111cb1cb1358ac6944ad356ca1738813ea1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/f44111cb1cb1358ac6944ad356ca1738813ea1 new file mode 100644 index 000000000..51a456f42 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/91/f44111cb1cb1358ac6944ad356ca1738813ea1 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/92/7d4943cdbdc9a667db8e62cfd0a41870235c51 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/92/7d4943cdbdc9a667db8e62cfd0a41870235c51 new file mode 100644 index 000000000..b6b92c842 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/92/7d4943cdbdc9a667db8e62cfd0a41870235c51 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/93/77fccdb210540b8c0520cc6e80eb632c20bd25 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/93/77fccdb210540b8c0520cc6e80eb632c20bd25 new file mode 100644 index 000000000..4b2d93b07 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/93/77fccdb210540b8c0520cc6e80eb632c20bd25 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/94/4f5dd1a867cab4c2bbcb896493435cae1dcc1a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/94/4f5dd1a867cab4c2bbcb896493435cae1dcc1a new file mode 100644 index 000000000..143093831 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/94/4f5dd1a867cab4c2bbcb896493435cae1dcc1a @@ -0,0 +1,2 @@ +xK!D]s +.z7 |2. bhWKVmH0~7z"P9`:Qi)QLEyq=oC*P6-"4l0StAHZC'g$楧f&%%g5qYeZokM2ԐX\ZDPC~^ZNfrIf^:XZHي1O(_,' jv^jnb^nJfZZjQj^ X#3|>^U:'A2R2 I{| 2mg˾15ӿ,\})TC)0H!vʉz֛9MՅ'6bGx \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/a9/0bc3fb6f15181972a2959a921429efbd81a473 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/a9/0bc3fb6f15181972a2959a921429efbd81a473 new file mode 100644 index 000000000..91113ee8e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/a9/0bc3fb6f15181972a2959a921429efbd81a473 @@ -0,0 +1,2 @@ +xK +1D]};7d=oo^UQT\;hk6@g 5rѓ]uOMndgz&c圈'} NJ7p?(G\8CآGTg9x$faxN" \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/40af3cb8a3ed2e2843e96d9aa7871336b94573 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/40af3cb8a3ed2e2843e96d9aa7871336b94573 new file mode 100644 index 000000000..7da1da656 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/40af3cb8a3ed2e2843e96d9aa7871336b94573 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/6c44a2e84492ad4b41bb6bac87353e9d02ac8b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/6c44a2e84492ad4b41bb6bac87353e9d02ac8b new file mode 100644 index 000000000..d840c1a57 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/6c44a2e84492ad4b41bb6bac87353e9d02ac8b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/929391ac42572f92110f3deeb4f0844a951e22 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/929391ac42572f92110f3deeb4f0844a951e22 new file mode 100644 index 000000000..8840d00c5 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ab/929391ac42572f92110f3deeb4f0844a951e22 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ac/4045f965119e6998f4340ed0f411decfb3ec05 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ac/4045f965119e6998f4340ed0f411decfb3ec05 new file mode 100644 index 000000000..4c32d63f8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ac/4045f965119e6998f4340ed0f411decfb3ec05 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/01aebfdf2ac13145efafe3f9fcf798882f1730 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/01aebfdf2ac13145efafe3f9fcf798882f1730 new file mode 100644 index 000000000..ae3ef8ce3 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/01aebfdf2ac13145efafe3f9fcf798882f1730 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/26b598134264fd284292cb233fc0b2f25851da b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/26b598134264fd284292cb233fc0b2f25851da new file mode 100644 index 000000000..5819a2e25 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/26b598134264fd284292cb233fc0b2f25851da differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/a14492498136771f69dd451866cabcb0e9ef9a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/a14492498136771f69dd451866cabcb0e9ef9a new file mode 100644 index 000000000..71023de39 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/a14492498136771f69dd451866cabcb0e9ef9a differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/a55a45d14527dc3dfc714ea1c65d2e1e6fbe87 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/a55a45d14527dc3dfc714ea1c65d2e1e6fbe87 new file mode 100644 index 000000000..3091b8f3d --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ad/a55a45d14527dc3dfc714ea1c65d2e1e6fbe87 @@ -0,0 +1 @@ +x+)JMU067d040031QH,-M-JOMLI+(aH:,:C: o>ZC'g$楧f&%%g5qYeZokM2ԐX\ZDPC~^ZNfrIf^:XZHي1O(_,' jvn~JfZ&5`nלU7 V.6t6L/R2 I{| 2mg˾15ӿ,\})TC)0<vʉz֛9MՅ'6bN* \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b2/d399ae15224e1d58066e3c8df70ce37de7a656 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b2/d399ae15224e1d58066e3c8df70ce37de7a656 new file mode 100644 index 000000000..20fa838f2 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b2/d399ae15224e1d58066e3c8df70ce37de7a656 @@ -0,0 +1,2 @@ +xQA1+xċϡ-kI*5f/z af!^/WJcܤ5Lƛ;+B6HZP|`h>\($sX@75}57K ++= ;g @!4!,\$\ \b/Hs#aQ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b4/2712cfe99a1a500b2a51fe984e0b8a7702ba11 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b4/2712cfe99a1a500b2a51fe984e0b8a7702ba11 new file mode 100644 index 000000000..2820b46cc --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b4/2712cfe99a1a500b2a51fe984e0b8a7702ba11 @@ -0,0 +1,5 @@ +xA + {B{M1 ߯>P3F֎7E02 X0̒,)$;:ܷ(: \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b6/f610aef53bd343e6c96227de874c66f00ee8e8 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b6/f610aef53bd343e6c96227de874c66f00ee8e8 new file mode 100644 index 000000000..fb102f15d Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b6/f610aef53bd343e6c96227de874c66f00ee8e8 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b7/a2576f9fc20024ac9ef17cb134acbd1ac73127 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b7/a2576f9fc20024ac9ef17cb134acbd1ac73127 new file mode 100644 index 000000000..22f2d137d Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b7/a2576f9fc20024ac9ef17cb134acbd1ac73127 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b8/a3a806d3950e8c0a03a34f234a92eff0e2c68d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b8/a3a806d3950e8c0a03a34f234a92eff0e2c68d new file mode 100644 index 000000000..24f029900 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/b8/a3a806d3950e8c0a03a34f234a92eff0e2c68d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ba/cac9b3493509aa15e1730e1545fc0919d1dae0 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ba/cac9b3493509aa15e1730e1545fc0919d1dae0 new file mode 100644 index 000000000..f35586f7f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ba/cac9b3493509aa15e1730e1545fc0919d1dae0 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bc/744705e1d8a019993cf88f62bc4020f1b80919 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bc/744705e1d8a019993cf88f62bc4020f1b80919 new file mode 100644 index 000000000..0d4bdb323 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bc/744705e1d8a019993cf88f62bc4020f1b80919 @@ -0,0 +1,2 @@ +xK +1D]}%%tYH& UJuj7:P(#F̄ģ1+k#vΚS8W|٨%Kpɯ3\Vv#MQg?wH@(c s9t 嶭{kO \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bc/95c75d59386147d1e79a87c33068d8dbfd71f2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bc/95c75d59386147d1e79a87c33068d8dbfd71f2 new file mode 100644 index 000000000..436d5a076 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bc/95c75d59386147d1e79a87c33068d8dbfd71f2 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/593285fc7fe4ca18ccdbabf027f5d689101452 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/593285fc7fe4ca18ccdbabf027f5d689101452 new file mode 100644 index 000000000..75ab1f0f3 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/593285fc7fe4ca18ccdbabf027f5d689101452 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/867fbae2faa80b920b002b80b1c91bcade7784 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/867fbae2faa80b920b002b80b1c91bcade7784 new file mode 100644 index 000000000..0f7421963 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/867fbae2faa80b920b002b80b1c91bcade7784 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/9cb4cd0a770cb9adcb5fce212142ef40ea1c35 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/9cb4cd0a770cb9adcb5fce212142ef40ea1c35 new file mode 100644 index 000000000..2aafdc64f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/bd/9cb4cd0a770cb9adcb5fce212142ef40ea1c35 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/be/f6e37b3ee632ba74159168836f382fed21d77d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/be/f6e37b3ee632ba74159168836f382fed21d77d new file mode 100644 index 000000000..6c243150d --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/be/f6e37b3ee632ba74159168836f382fed21d77d @@ -0,0 +1,2 @@ +xK +1D]}3?Ač7p?$=`Ґx}Gރ`)+0ѮUh.NWޓ!Idlj-f 9UV61:̸ !>Z.P0x hhQ+t`1NZe,X[ =vyI_vJ^2$?I7o4{K>V!~|U= \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c5/bbe550b9f09444bdddd3ecf3d97c0b42aa786c b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c5/bbe550b9f09444bdddd3ecf3d97c0b42aa786c new file mode 100644 index 000000000..2f2ada732 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c5/bbe550b9f09444bdddd3ecf3d97c0b42aa786c differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c6/07fc30883e335def28cd686b51f6cfa02b06ec b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c6/07fc30883e335def28cd686b51f6cfa02b06ec new file mode 100644 index 000000000..475b87ef9 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c6/07fc30883e335def28cd686b51f6cfa02b06ec @@ -0,0 +1,2 @@ +xQ +1 D)r%n "x/m[[oo{0k)iכ*`ZavJ>,af<EZȳ5%<'.v,;]=2tws-,w8@ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c6/92ecf62007c0ac9fb26e2aa884de2933de15ed b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c6/92ecf62007c0ac9fb26e2aa884de2933de15ed new file mode 100644 index 000000000..ae430bd4a Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c6/92ecf62007c0ac9fb26e2aa884de2933de15ed differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c8/f06f2e3bb2964174677e91f0abead0e43c9e5d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c8/f06f2e3bb2964174677e91f0abead0e43c9e5d new file mode 100644 index 000000000..5dae4c3ac Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c8/f06f2e3bb2964174677e91f0abead0e43c9e5d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c9/174cef549ec94ecbc43ef03cdc775b4950becb b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c9/174cef549ec94ecbc43ef03cdc775b4950becb new file mode 100644 index 000000000..da8dba244 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c9/174cef549ec94ecbc43ef03cdc775b4950becb @@ -0,0 +1,2 @@ +xQ +0D)rfnSxfCHx}xfc,˵Y kUb8pu`%|@r3GtB;W]!z'%QiӐdT ?\=d/sYe';^r#l`6m Z7U^e6oVO \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c9/4b27e41064c521120627e07e2035cca1d24ffa b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c9/4b27e41064c521120627e07e2035cca1d24ffa new file mode 100644 index 000000000..fd1ec9fab Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/c9/4b27e41064c521120627e07e2035cca1d24ffa differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ca/b2cf23998b40f1af2d9d9a756dc9e285a8df4b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ca/b2cf23998b40f1af2d9d9a756dc9e285a8df4b new file mode 100644 index 000000000..32ba2aa53 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ca/b2cf23998b40f1af2d9d9a756dc9e285a8df4b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ca/ff6b7d44973f53e3e0cf31d0d695188b19aec6 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ca/ff6b7d44973f53e3e0cf31d0d695188b19aec6 new file mode 100644 index 000000000..6d0f60077 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ca/ff6b7d44973f53e3e0cf31d0d695188b19aec6 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cb/491780d82e46dc88a065b965ab307a038f2bc2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cb/491780d82e46dc88a065b965ab307a038f2bc2 new file mode 100644 index 000000000..cf9cd7d39 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cb/491780d82e46dc88a065b965ab307a038f2bc2 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cb/6693a788715b82440a54e0eacd19ba9f6ec559 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cb/6693a788715b82440a54e0eacd19ba9f6ec559 new file mode 100644 index 000000000..e11181a96 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cb/6693a788715b82440a54e0eacd19ba9f6ec559 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cc/338e4710c9b257106b8d16d82f86458d5beaf1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cc/338e4710c9b257106b8d16d82f86458d5beaf1 new file mode 100644 index 000000000..85b3b8112 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cc/338e4710c9b257106b8d16d82f86458d5beaf1 @@ -0,0 +1,2 @@ +xK!]s3`bo1 gpWEGmx]6d +eaΉ碵z.Dv [hD[JﱶwX[.2nuVƉZڳF!x88GPP_?KN \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cc/3e3009134cb88014129fc8858d1101359e5e2f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cc/3e3009134cb88014129fc8858d1101359e5e2f new file mode 100644 index 000000000..9a0cb7a0c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cc/3e3009134cb88014129fc8858d1101359e5e2f @@ -0,0 +1,2 @@ +x] +0})&_H -Fb[6}0L2wPzc*sXb Rt#G$[lvH$kf.ʧLF+ QHD|68Wl.S]uoNOu9Va0^ZF9^# Od \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ce/8860d49e3bea6fd745874a01b7c3e46da8cbc3 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ce/8860d49e3bea6fd745874a01b7c3e46da8cbc3 new file mode 100644 index 000000000..860f9952f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ce/8860d49e3bea6fd745874a01b7c3e46da8cbc3 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ce/e656c392ad0557b3aae0fb411475c206e2926f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ce/e656c392ad0557b3aae0fb411475c206e2926f new file mode 100644 index 000000000..ff0624ccb Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ce/e656c392ad0557b3aae0fb411475c206e2926f differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cf/8c5cc8a85a1ff5a4ba51e0bc7cf5665669924d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cf/8c5cc8a85a1ff5a4ba51e0bc7cf5665669924d new file mode 100644 index 000000000..36b0289e6 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/cf/8c5cc8a85a1ff5a4ba51e0bc7cf5665669924d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d0/7ec190c306ec690bac349e87d01c4358e49bb2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d0/7ec190c306ec690bac349e87d01c4358e49bb2 new file mode 100644 index 000000000..d52a56ffe --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d0/7ec190c306ec690bac349e87d01c4358e49bb2 @@ -0,0 +1,2 @@ +xՏ 0 3aOb%ǑS=HT@u:]uYG%LE;u`_?g~0Ҕ. +׋PӜxvXi ӭf! \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d0/d4594e16f2e19107e3fa7ea63e7aaaff305ffb b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d0/d4594e16f2e19107e3fa7ea63e7aaaff305ffb new file mode 100644 index 000000000..5f7e286ff Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d0/d4594e16f2e19107e3fa7ea63e7aaaff305ffb differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d2/f8637f2eab2507a1e13cbc9df4729ec386627e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d2/f8637f2eab2507a1e13cbc9df4729ec386627e new file mode 100644 index 000000000..558a8513f Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d2/f8637f2eab2507a1e13cbc9df4729ec386627e differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/3cedf513c059e0515653fa2c2e386631387a05 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/3cedf513c059e0515653fa2c2e386631387a05 new file mode 100644 index 000000000..d6d4c2b45 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/3cedf513c059e0515653fa2c2e386631387a05 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/719a5ae8e4d92276b5313ce976f6ee5af2b436 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/719a5ae8e4d92276b5313ce976f6ee5af2b436 new file mode 100644 index 000000000..930bf5a5e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/719a5ae8e4d92276b5313ce976f6ee5af2b436 @@ -0,0 +1,2 @@ +x=10 E}uAHب zRHPT Brh/]?a 48,_MdkуTPF!TZQ? +R֧FN_J͆ h{(kLKV1p+Q A \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/7aa3bbfe1c0c49b909781251b956dbabe85f96 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/7aa3bbfe1c0c49b909781251b956dbabe85f96 new file mode 100644 index 000000000..5902e0f32 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/7aa3bbfe1c0c49b909781251b956dbabe85f96 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/7ad72a2052685fc6201c2af90103ad42d2079b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/7ad72a2052685fc6201c2af90103ad42d2079b new file mode 100644 index 000000000..b2f39bff4 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d3/7ad72a2052685fc6201c2af90103ad42d2079b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d4/207f77243500bec335ab477f9227fcdb1e271a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d4/207f77243500bec335ab477f9227fcdb1e271a new file mode 100644 index 000000000..862e4e5bc --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d4/207f77243500bec335ab477f9227fcdb1e271a @@ -0,0 +1,2 @@ +xK +1D]O'7t:݌H&z:]oZBBXl(昭+d<"6^% A( J,% %5SSmR^؊Nu^뢏O:Wځ| DcFQEn6#Q \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d4/27e0b2e138501a3d15cc376077a3631e15bd46 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d4/27e0b2e138501a3d15cc376077a3631e15bd46 new file mode 100644 index 000000000..0b3611ae4 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d4/27e0b2e138501a3d15cc376077a3631e15bd46 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/093787ef302b941b6aab081b99fb4880038bd8 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/093787ef302b941b6aab081b99fb4880038bd8 new file mode 100644 index 000000000..7d73449eb Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/093787ef302b941b6aab081b99fb4880038bd8 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/a61b0b4992a4f0caa887fa08b52431e727bb6f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/a61b0b4992a4f0caa887fa08b52431e727bb6f new file mode 100644 index 000000000..a7921de43 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/a61b0b4992a4f0caa887fa08b52431e727bb6f differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/b6fc965c926a1bfc9ee456042b94088b5c5d21 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/b6fc965c926a1bfc9ee456042b94088b5c5d21 new file mode 100644 index 000000000..924bdbbb5 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/b6fc965c926a1bfc9ee456042b94088b5c5d21 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/ec1152fe25e9fec00189eb00b3db71db24c218 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/ec1152fe25e9fec00189eb00b3db71db24c218 new file mode 100644 index 000000000..0d2534bc9 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d5/ec1152fe25e9fec00189eb00b3db71db24c218 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/42b9770c66bba94a08df09b5efb095001f76d7 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/42b9770c66bba94a08df09b5efb095001f76d7 new file mode 100644 index 000000000..1671f9f2c Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/42b9770c66bba94a08df09b5efb095001f76d7 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/462fa3f5292857db599c54aea2bf91616230c5 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/462fa3f5292857db599c54aea2bf91616230c5 new file mode 100644 index 000000000..baae3f0e0 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/462fa3f5292857db599c54aea2bf91616230c5 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/cf6c7741b3316826af1314042550c97ded1d50 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/cf6c7741b3316826af1314042550c97ded1d50 new file mode 100644 index 000000000..8f9ae1fc6 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d6/cf6c7741b3316826af1314042550c97ded1d50 @@ -0,0 +1,2 @@ +xQ +1 D)r%i@oje[7̤ZʽMSLBNlm B~>-uY8ꠟt֯]Qa͠3f]>bl(A] \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d7/308cc367b2cc23f710834ec1fd8ffbacf1b460 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d7/308cc367b2cc23f710834ec1fd8ffbacf1b460 new file mode 100644 index 000000000..b02cda4fa --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d7/308cc367b2cc23f710834ec1fd8ffbacf1b460 @@ -0,0 +1 @@ +xK @]s)Ё7 ]I(x{ ^,nлSo`/X)ٙB@GÔaD 4xwlCv?-79d,hF4Z ;ƝH}= \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/74671ef5b20184836cb983bb273e5280384d0b b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/74671ef5b20184836cb983bb273e5280384d0b new file mode 100644 index 000000000..1d8037895 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/74671ef5b20184836cb983bb273e5280384d0b differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/dec75ff2f8b41d1c5bfef0cd57b7300c834f66 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/dec75ff2f8b41d1c5bfef0cd57b7300c834f66 new file mode 100644 index 000000000..74f807e68 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/dec75ff2f8b41d1c5bfef0cd57b7300c834f66 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/fa77b6833082c1ea36b7828a582d4c43882450 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/fa77b6833082c1ea36b7828a582d4c43882450 new file mode 100644 index 000000000..988145322 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d8/fa77b6833082c1ea36b7828a582d4c43882450 @@ -0,0 +1 @@ +x1 DQkN1&6%lBknaa1kdI(Ur'7LA,+Wm9 I'U͹_ܰN \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d9/63979c237d08b6ba39062ee7bf64c7d34a27f8 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d9/63979c237d08b6ba39062ee7bf64c7d34a27f8 new file mode 100644 index 000000000..5fa10405c Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/d9/63979c237d08b6ba39062ee7bf64c7d34a27f8 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/da/178208145ef585a1bd5ca5f4c9785d738df2cf b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/da/178208145ef585a1bd5ca5f4c9785d738df2cf new file mode 100644 index 000000000..6292118e0 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/da/178208145ef585a1bd5ca5f4c9785d738df2cf differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/db/6261a7c65c7fd678520c9bb6f2c47582ab9ed5 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/db/6261a7c65c7fd678520c9bb6f2c47582ab9ed5 new file mode 100644 index 000000000..b82e7fcaf Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/db/6261a7c65c7fd678520c9bb6f2c47582ab9ed5 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/dd/2ae5ab264e5592aa754235d5ad5eac8f0ecdfd b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/dd/2ae5ab264e5592aa754235d5ad5eac8f0ecdfd new file mode 100644 index 000000000..55626a57b Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/dd/2ae5ab264e5592aa754235d5ad5eac8f0ecdfd differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/dd/9a570c3400e6e07bc4d7651d6e20b08926b3d9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/dd/9a570c3400e6e07bc4d7651d6e20b08926b3d9 new file mode 100644 index 000000000..8fd60cbe8 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/dd/9a570c3400e6e07bc4d7651d6e20b08926b3d9 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/de/872ee3618b894992e9d1e18ba2ebe256a112f9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/de/872ee3618b894992e9d1e18ba2ebe256a112f9 new file mode 100644 index 000000000..04dda4a75 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/de/872ee3618b894992e9d1e18ba2ebe256a112f9 @@ -0,0 +1 @@ +x퐱 S3ŏlKAB4Wb T5:8Sc ԻP`KIˆO3Z&ؐ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/df/e3f22baa1f6fce5447901c3086bae368de6bdd b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/df/e3f22baa1f6fce5447901c3086bae368de6bdd new file mode 100644 index 000000000..e13569440 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/df/e3f22baa1f6fce5447901c3086bae368de6bdd differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e0/67f9361140f19391472df8a82d6610813c73b7 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e0/67f9361140f19391472df8a82d6610813c73b7 new file mode 100644 index 000000000..955431dd7 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e0/67f9361140f19391472df8a82d6610813c73b7 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e1/129b3cfb5898e0fbd606e0cb80b2755e50d161 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e1/129b3cfb5898e0fbd606e0cb80b2755e50d161 new file mode 100644 index 000000000..751f1dd33 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e1/129b3cfb5898e0fbd606e0cb80b2755e50d161 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e1/7ace1492648c9dc5701bad5c47af9d1b60c4e9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e1/7ace1492648c9dc5701bad5c47af9d1b60c4e9 new file mode 100644 index 000000000..4a812e5df Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e1/7ace1492648c9dc5701bad5c47af9d1b60c4e9 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e2/c6abbd55fed5ac71a5f2751e29b4a34726a595 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e2/c6abbd55fed5ac71a5f2751e29b4a34726a595 new file mode 100644 index 000000000..7b84ce966 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e2/c6abbd55fed5ac71a5f2751e29b4a34726a595 @@ -0,0 +1 @@ +x+)JMU067f040031QH,-M-JOMLI+(aH:,:C: o>ZC'g$楧f&%%g5qYeZokM2ԐX\ZDPC~^ZNfrIf^:XZHي1O(_,' jvn~JfZ&5%\N,5[e2 I{| 2mg˾15ӿ,\})TC)0Dvz֛9MՅ'6b \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e3/1e7ad3ed298f24e383c4950f4671993ec078e4 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e3/1e7ad3ed298f24e383c4950f4671993ec078e4 new file mode 100644 index 000000000..a28ded3fb Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e3/1e7ad3ed298f24e383c4950f4671993ec078e4 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e3/76fbdd06ebf021c92724da9f26f44212734e3e b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e3/76fbdd06ebf021c92724da9f26f44212734e3e new file mode 100644 index 000000000..8da234114 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e3/76fbdd06ebf021c92724da9f26f44212734e3e @@ -0,0 +1,3 @@ +xA@E]s +`@ uH)M=Scz:ʊ(N+6ޛDFe𭭘Yg$+G&F +pG 4mQ\85#FC~QERu);c6'j \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e4/9f917b448d1340b31d76e54ba388268fd4c922 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e4/9f917b448d1340b31d76e54ba388268fd4c922 new file mode 100644 index 000000000..870c3e732 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e4/9f917b448d1340b31d76e54ba388268fd4c922 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e4/f618a2c3ed0669308735727df5ebf2447f022f b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e4/f618a2c3ed0669308735727df5ebf2447f022f new file mode 100644 index 000000000..c7e1ee9d7 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/e4/f618a2c3ed0669308735727df5ebf2447f022f @@ -0,0 +1,2 @@ +xK!D]s +.iOboi2. bhJQ6b`7:DN.%4uIQYcm`Q¨ aQYa@>ɗEc9%bhf1x}xwUQv kv@`O;$Kșybh2癈sLA ?R\˷ץ(~Yïb-'Yǎp=Njq˟m[zO+ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fa/c03f2c5139618d87d53614c153823bf1f31396 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fa/c03f2c5139618d87d53614c153823bf1f31396 new file mode 100644 index 000000000..30e07e5b7 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fa/c03f2c5139618d87d53614c153823bf1f31396 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fa/da9356aa3f74622327a3038ae9c6f92e1c5c1d b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fa/da9356aa3f74622327a3038ae9c6f92e1c5c1d new file mode 100644 index 000000000..16ce49a1b Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fa/da9356aa3f74622327a3038ae9c6f92e1c5c1d differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fb/738a106cfd097a4acb96ce132ecb1ad6c46b03 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fb/738a106cfd097a4acb96ce132ecb1ad6c46b03 new file mode 100644 index 000000000..4f1e72688 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fb/738a106cfd097a4acb96ce132ecb1ad6c46b03 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/4c636d6515e9e261f9260dbcf3cc6eca97ea08 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/4c636d6515e9e261f9260dbcf3cc6eca97ea08 new file mode 100644 index 000000000..be8a810cd Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/4c636d6515e9e261f9260dbcf3cc6eca97ea08 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/7d7b805f7a9428574f4f802b2e34cd20ab9d99 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/7d7b805f7a9428574f4f802b2e34cd20ab9d99 new file mode 100644 index 000000000..20493e68c Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/7d7b805f7a9428574f4f802b2e34cd20ab9d99 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/90237dc4891fa6c69827fc465632225e391618 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/90237dc4891fa6c69827fc465632225e391618 new file mode 100644 index 000000000..961814bae Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fc/90237dc4891fa6c69827fc465632225e391618 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fd/57d2d6770fad8e9959124793a17f441b571e66 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fd/57d2d6770fad8e9959124793a17f441b571e66 new file mode 100644 index 000000000..21e6b2c55 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fd/57d2d6770fad8e9959124793a17f441b571e66 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fd/89f8cffb663ac89095a0f9764902e93ceaca6a b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fd/89f8cffb663ac89095a0f9764902e93ceaca6a new file mode 100644 index 000000000..2f9d83b26 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fd/89f8cffb663ac89095a0f9764902e93ceaca6a @@ -0,0 +1,2 @@ +xK!D]s +.{`cx/ɸ`0 oURy|Y`dPA!4C2d=x#e`BgrubLffG@՗-}KԲUy=];)r0 R$(%o=׶OPw \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fe/5407fc50a53aecb41d1a6e9ea7b612e581af87 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fe/5407fc50a53aecb41d1a6e9ea7b612e581af87 new file mode 100644 index 000000000..4ce7d2297 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/fe/5407fc50a53aecb41d1a6e9ea7b612e581af87 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ff/49d07869831ad761bbdaea026086f8789bcb00 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ff/49d07869831ad761bbdaea026086f8789bcb00 new file mode 100644 index 000000000..eada39b77 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ff/49d07869831ad761bbdaea026086f8789bcb00 differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ff/b312248d607284c290023f9502eea010d34efd b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ff/b312248d607284c290023f9502eea010d34efd new file mode 100644 index 000000000..7e46c4fe3 Binary files /dev/null and b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/objects/ff/b312248d607284c290023f9502eea010d34efd differ diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/branch new file mode 100644 index 000000000..03f79a3dc --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/branch @@ -0,0 +1 @@ +7cb63eed597130ba4abb87b3e544b85021905520 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_ancestor b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_ancestor new file mode 100644 index 000000000..4bc37ac60 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_ancestor @@ -0,0 +1 @@ +2da538570bc1e5b2c3e855bf702f35248ad0735f diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_side1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_side1 new file mode 100644 index 000000000..ca6dd679d --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_side1 @@ -0,0 +1 @@ +a7dbfcbfc1a60709cb80b5ca24539008456531d0 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_side2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_side2 new file mode 100644 index 000000000..b8160f80e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/df_side2 @@ -0,0 +1 @@ +fc90237dc4891fa6c69827fc465632225e391618 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/ff_branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/ff_branch new file mode 100644 index 000000000..e9e90512f --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/ff_branch @@ -0,0 +1 @@ +fd89f8cffb663ac89095a0f9764902e93ceaca6a diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/master b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/master new file mode 100644 index 000000000..8a329ae5f --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/master @@ -0,0 +1 @@ +bd593285fc7fe4ca18ccdbabf027f5d689101452 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo1 new file mode 100644 index 000000000..4d2c66902 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo1 @@ -0,0 +1 @@ +16f825815cfd20a07a75c71554e82d8eede0b061 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo2 new file mode 100644 index 000000000..f503977a7 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo2 @@ -0,0 +1 @@ +158dc7bedb202f5b26502bf3574faa7f4238d56c diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo3 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo3 new file mode 100644 index 000000000..b92994f10 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo3 @@ -0,0 +1 @@ +50ce7d7d01217679e26c55939eef119e0c93e272 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo4 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo4 new file mode 100644 index 000000000..f33d57cbc --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo4 @@ -0,0 +1 @@ +54269b3f6ec3d7d4ede24dd350dd5d605495c3ae diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo5 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo5 new file mode 100644 index 000000000..e9f943385 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo5 @@ -0,0 +1 @@ +e4f618a2c3ed0669308735727df5ebf2447f022f diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo6 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo6 new file mode 100644 index 000000000..4c5a98ad9 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/octo6 @@ -0,0 +1 @@ +b6f610aef53bd343e6c96227de874c66f00ee8e8 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/previous b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/previous new file mode 100644 index 000000000..7bc1a8d15 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/previous @@ -0,0 +1 @@ +c607fc30883e335def28cd686b51f6cfa02b06ec diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_ancestor b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_ancestor new file mode 100644 index 000000000..4092d428f --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_ancestor @@ -0,0 +1 @@ +2392a2dacc9efb562b8635d6579fb458751c7c5b diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_ours b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_ours new file mode 100644 index 000000000..a1c50dce8 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_ours @@ -0,0 +1 @@ +34bfafff88eaf118402b44e6f3e2dbbf1a582b05 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_theirs b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_theirs new file mode 100644 index 000000000..130989399 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/rename_conflict_theirs @@ -0,0 +1 @@ +a802e06f1782a9645b9851bc7202cee74a8a4972 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/renames1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/renames1 new file mode 100644 index 000000000..3d248102c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/renames1 @@ -0,0 +1 @@ +412b32fb66137366147f1801ecc962452757d48a diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/renames2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/renames2 new file mode 100644 index 000000000..d22621561 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/renames2 @@ -0,0 +1 @@ +ab40af3cb8a3ed2e2843e96d9aa7871336b94573 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules new file mode 100644 index 000000000..e5511eca9 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules @@ -0,0 +1 @@ +d8dec75ff2f8b41d1c5bfef0cd57b7300c834f66 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules-branch new file mode 100644 index 000000000..7d47e07b8 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules-branch @@ -0,0 +1 @@ +811c70fcb6d5bbd022d04cc31836d30b436f9551 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules-branch2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules-branch2 new file mode 100644 index 000000000..ced60d813 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/submodules-branch2 @@ -0,0 +1 @@ +7c04ca611203ed320c5f495b9813054dd23be3be diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-10 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-10 new file mode 100644 index 000000000..5b378cd88 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-10 @@ -0,0 +1 @@ +0ec5f433959cd46177f745903353efb5be08d151 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-10-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-10-branch new file mode 100644 index 000000000..b3db6c892 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-10-branch @@ -0,0 +1 @@ +11f4f3c08b737f5fd896cbefa1425ee63b21b2fa diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-11 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-11 new file mode 100644 index 000000000..154de9a64 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-11 @@ -0,0 +1 @@ +3168dca1a561889b045a6441909f4c56145e666d diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-11-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-11-branch new file mode 100644 index 000000000..2e4118029 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-11-branch @@ -0,0 +1 @@ +6718a45909532d1fcf5600d0877f7fe7e78f0b86 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-13 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-13 new file mode 100644 index 000000000..297573a57 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-13 @@ -0,0 +1 @@ +a3fabece9eb8748da810e1e08266fef9b7136ad4 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-13-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-13-branch new file mode 100644 index 000000000..22e429a61 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-13-branch @@ -0,0 +1 @@ +05f3c1a2a56ca95c3d2ef28dc9ddf32b5cd6c91c diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-14 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-14 new file mode 100644 index 000000000..89051853a --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-14 @@ -0,0 +1 @@ +7e2d058d5fedf8329db44db4fac610d6b1a89159 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-14-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-14-branch new file mode 100644 index 000000000..0158f950c --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-14-branch @@ -0,0 +1 @@ +8187117062b750eed4f93fd7e899f17b52ce554d diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-2alt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-2alt new file mode 100644 index 000000000..474074120 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-2alt @@ -0,0 +1 @@ +566ab53c220a2eafc1212af1a024513230280ab9 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-2alt-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-2alt-branch new file mode 100644 index 000000000..2f5f1a4af --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-2alt-branch @@ -0,0 +1 @@ +c9174cef549ec94ecbc43ef03cdc775b4950becb diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-3alt b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-3alt new file mode 100644 index 000000000..18e50ae12 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-3alt @@ -0,0 +1 @@ +4c9fac0707f8d4195037ae5a681aa48626491541 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-3alt-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-3alt-branch new file mode 100644 index 000000000..7bc1a8d15 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-3alt-branch @@ -0,0 +1 @@ +c607fc30883e335def28cd686b51f6cfa02b06ec diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-4 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-4 new file mode 100644 index 000000000..f49bbf956 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-4 @@ -0,0 +1 @@ +cc3e3009134cb88014129fc8858d1101359e5e2f diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-4-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-4-branch new file mode 100644 index 000000000..bff519ef1 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-4-branch @@ -0,0 +1 @@ +183310e30fb1499af8c619108ffea4d300b5e778 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-1 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-1 new file mode 100644 index 000000000..963a7b336 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-1 @@ -0,0 +1 @@ +4fe93c0ec83eb6305cbace3dace88ecee1b63cb6 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-1-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-1-branch new file mode 100644 index 000000000..4a22138e7 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-1-branch @@ -0,0 +1 @@ +478172cb2f5ff9b514bc9d04d3bd5ef5840cb3b2 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-2 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-2 new file mode 100644 index 000000000..aa4ada17e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-2 @@ -0,0 +1 @@ +3b47b031b3e55ae11e14a05260b1c3ffd6838d55 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-2-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-2-branch new file mode 100644 index 000000000..5553cdba1 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-5alt-2-branch @@ -0,0 +1 @@ +f48097eb340dc5a7cae55aabcf1faf4548aa821f diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-6 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-6 new file mode 100644 index 000000000..fb685bb63 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-6 @@ -0,0 +1 @@ +99b4f7e4f24470fa06b980bc21f1095c2a9425c0 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-6-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-6-branch new file mode 100644 index 000000000..efc4c55ac --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-6-branch @@ -0,0 +1 @@ +a43150a738849c59376cf30bb2a68348a83c8f48 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-7 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-7 new file mode 100644 index 000000000..9c9424346 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-7 @@ -0,0 +1 @@ +d874671ef5b20184836cb983bb273e5280384d0b diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-7-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-7-branch new file mode 100644 index 000000000..1762bb5db --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-7-branch @@ -0,0 +1 @@ +5195a1b480f66691b667f10a9e41e70115a78351 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-8 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-8 new file mode 100644 index 000000000..837c4915a --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-8 @@ -0,0 +1 @@ +3575826c96a975031d2c14368529cc5c4353a8fd diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-8-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-8-branch new file mode 100644 index 000000000..874230eff --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-8-branch @@ -0,0 +1 @@ +52d8bc572af2b6d4ee0d5e62ed5d1fbad92210a9 diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-9 b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-9 new file mode 100644 index 000000000..b968a3efb --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-9 @@ -0,0 +1 @@ +c35dee9bcc0e989f3b0c40f68372a9a51b6c4e6a diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-9-branch b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-9-branch new file mode 100644 index 000000000..7f3097b69 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/trivial-9-branch @@ -0,0 +1 @@ +13d1be4ea52a6ced1d7a1d832f0ee3c399348e5e diff --git a/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/unrelated b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/unrelated new file mode 100644 index 000000000..bb877be2e --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergerenames_wd/dot_git/refs/heads/unrelated @@ -0,0 +1 @@ +55b4e4687e7a0d9ca367016ed930f385d4022e6f diff --git a/LibGit2Sharp.Tests/Resources/testrepo.git/objects/25/2846a95d7b031136d19f5a8a85ebed204cdbef b/LibGit2Sharp.Tests/Resources/testrepo.git/objects/25/2846a95d7b031136d19f5a8a85ebed204cdbef new file mode 100644 index 000000000..483e735a3 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/testrepo.git/objects/25/2846a95d7b031136d19f5a8a85ebed204cdbef @@ -0,0 +1,2 @@ +x D=SŖ ?j .A1v/&& h,i੕RrzH葔Ӌw|! +n-[8ׇ /!8 G$ \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/testrepo.git/refs/tags/tag_without_tagger b/LibGit2Sharp.Tests/Resources/testrepo.git/refs/tags/tag_without_tagger new file mode 100644 index 000000000..9488f855f --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/testrepo.git/refs/tags/tag_without_tagger @@ -0,0 +1 @@ +252846a95d7b031136d19f5a8a85ebed204cdbef diff --git a/LibGit2Sharp.Tests/StageFixture.cs b/LibGit2Sharp.Tests/StageFixture.cs index 5499f578b..3355645f0 100644 --- a/LibGit2Sharp.Tests/StageFixture.cs +++ b/LibGit2Sharp.Tests/StageFixture.cs @@ -67,7 +67,7 @@ public void StagingAnUnknownFileThrowsIfExplicitPath(string relativePath, FileSt Assert.Null(repo.Index[relativePath]); Assert.Equal(status, repo.Index.RetrieveStatus(relativePath)); - Assert.Throws(() => repo.Index.Stage(relativePath, new ExplicitPathsOptions())); + Assert.Throws(() => repo.Index.Stage(relativePath, new StageOptions { ExplicitPathsOptions = new ExplicitPathsOptions() })); } } @@ -82,7 +82,7 @@ public void CanStageAnUnknownFileWithLaxUnmatchedExplicitPathsValidation(string Assert.Equal(status, repo.Index.RetrieveStatus(relativePath)); Assert.DoesNotThrow(() => repo.Index.Stage(relativePath)); - Assert.DoesNotThrow(() => repo.Index.Stage(relativePath, new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false })); + Assert.DoesNotThrow(() => repo.Index.Stage(relativePath, new StageOptions { ExplicitPathsOptions = new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false } })); Assert.Equal(status, repo.Index.RetrieveStatus(relativePath)); } @@ -99,7 +99,7 @@ public void StagingAnUnknownFileWithLaxExplicitPathsValidationDoesntThrow(string Assert.Equal(status, repo.Index.RetrieveStatus(relativePath)); repo.Index.Stage(relativePath); - repo.Index.Stage(relativePath, new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false }); + repo.Index.Stage(relativePath, new StageOptions { ExplicitPathsOptions = new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false } }); } } @@ -299,6 +299,22 @@ public void CanStageWithMultiplePathspecs() } } + [Theory] + [InlineData("ignored_file.txt")] + [InlineData("ignored_folder/file.txt")] + public void CanIgnoreIgnoredPaths(string path) + { + using (var repo = new Repository(CloneStandardTestRepo())) + { + Touch(repo.Info.WorkingDirectory, ".gitignore", "ignored_file.txt\nignored_folder/\n"); + Touch(repo.Info.WorkingDirectory, path, "This file is ignored."); + + Assert.Equal(FileStatus.Ignored, repo.Index.RetrieveStatus(path)); + repo.Index.Stage("*"); + Assert.Equal(FileStatus.Ignored, repo.Index.RetrieveStatus(path)); + } + } + [Theory] [InlineData("ignored_file.txt")] [InlineData("ignored_folder/file.txt")] @@ -310,7 +326,7 @@ public void CanStageIgnoredPaths(string path) Touch(repo.Info.WorkingDirectory, path, "This file is ignored."); Assert.Equal(FileStatus.Ignored, repo.Index.RetrieveStatus(path)); - repo.Index.Stage(path); + repo.Index.Stage(path, new StageOptions { IncludeIgnored = true }); Assert.Equal(FileStatus.Added, repo.Index.RetrieveStatus(path)); } } diff --git a/LibGit2Sharp.Tests/StatusFixture.cs b/LibGit2Sharp.Tests/StatusFixture.cs index 4a63bc93d..b70ff0ae0 100644 --- a/LibGit2Sharp.Tests/StatusFixture.cs +++ b/LibGit2Sharp.Tests/StatusFixture.cs @@ -495,12 +495,8 @@ public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectivesThroug Assert.Equal(FileStatus.Ignored, repo.Index.RetrieveStatus("bin/look-ma.txt")); Assert.Equal(FileStatus.Untracked, repo.Index.RetrieveStatus("bin/what-about-me.txt")); - // bin/* is considered as ignoring the dir itself newStatus = repo.Index.RetrieveStatus(); - Assert.Equal(new[] { "bin" + dirSep }, newStatus.Ignored.Select(s => s.FilePath)); - // if we recurse into ignored dirs, then we get the actual list - newStatus = repo.Index.RetrieveStatus(new StatusOptions { RecurseIgnoredDirs = true }); Assert.Equal(new[] { "bin" + dirSep + "look-ma.txt" }, newStatus.Ignored.Select(s => s.FilePath)); Assert.True(newStatus.Untracked.Select(s => s.FilePath).Contains("bin" + dirSep + "what-about-me.txt")); } diff --git a/LibGit2Sharp.Tests/TagFixture.cs b/LibGit2Sharp.Tests/TagFixture.cs index 7d5751ad1..bd008af34 100644 --- a/LibGit2Sharp.Tests/TagFixture.cs +++ b/LibGit2Sharp.Tests/TagFixture.cs @@ -9,7 +9,7 @@ namespace LibGit2Sharp.Tests { public class TagFixture : BaseFixture { - private readonly string[] expectedTags = new[] { "e90810b", "lw", "point_to_blob", "test", }; + private readonly string[] expectedTags = new[] { "e90810b", "lw", "point_to_blob", "tag_without_tagger", "test", }; private static readonly Signature signatureTim = new Signature("Tim Clem", "timothy.clem@gmail.com", TruncateSubSeconds(DateTimeOffset.UtcNow)); private static readonly Signature signatureNtk = new Signature("nulltoken", "emeric.fermas@gmail.com", Epoch.ToDateTimeOffset(1300557894, 60)); @@ -234,7 +234,7 @@ public void CreatingATagInAEmptyRepositoryThrows() using (var repo = new Repository(repoPath)) { - Assert.Throws(() => repo.ApplyTag("mynotag")); + Assert.Throws(() => repo.ApplyTag("mynotag")); } } @@ -246,7 +246,8 @@ public void CreatingATagForHeadInAEmptyRepositoryThrows() using (var repo = new Repository(repoPath)) { - Assert.Throws(() => repo.ApplyTag("mytaghead", "HEAD")); + Assert.Throws(() => repo.ApplyTag("mytaghead", "HEAD")); + Assert.Throws(() => repo.ApplyTag("mytaghead")); } } @@ -287,6 +288,26 @@ public void CanAddATagForImplicitHead() } } + [Fact] + public void CanAddATagForImplicitHeadInDetachedState() + { + string path = CloneStandardTestRepo(); + using (var repo = new Repository(path)) + { + repo.Checkout(repo.Head.Tip); + + Assert.True(repo.Info.IsHeadDetached); + + Tag tag = repo.ApplyTag("mytag"); + Assert.NotNull(tag); + + Assert.Equal(repo.Head.Tip.Id, tag.Target.Id); + + Tag retrievedTag = repo.Tags[tag.CanonicalName]; + Assert.Equal(retrievedTag, tag); + } + } + [Fact] // Ported from cgit (https://github.com/git/git/blob/1c08bf50cfcf924094eca56c2486a90e2bf1e6e2/t/t7004-tag.sh#L87) public void CreatingADuplicateTagThrows() @@ -350,6 +371,25 @@ public void CanAddATagPointingToATree() } } + [Fact] + public void CanReadTagWithoutTagger() + { + // Not all tags have a tagger. + using (var repo = new Repository(BareTestRepoPath)) + { + Tag tag = repo.Tags["tag_without_tagger"]; + + Assert.True(tag.IsAnnotated); + Assert.NotNull(tag.Target); + Assert.Null(tag.Annotation.Tagger); + + Tree tree = repo.Lookup("581f9824ecaf824221bd36edf5430f2739a7c4f5"); + Assert.NotNull(tree); + + Assert.Equal(tree.Id, tag.Target.Id); + } + } + [Fact] public void CanAddATagPointingToABlob() { @@ -590,7 +630,7 @@ public void CanListTags() { Assert.Equal(expectedTags, SortedTags(repo.Tags, t => t.Name)); - Assert.Equal(4, repo.Tags.Count()); + Assert.Equal(5, repo.Tags.Count()); } } diff --git a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs index 5dfa5b123..b01d04c40 100644 --- a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs +++ b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs @@ -30,6 +30,7 @@ static BaseFixture() public static string ShallowTestRepoPath { get; private set; } public static string MergedTestRepoWorkingDirPath { get; private set; } public static string MergeTestRepoWorkingDirPath { get; private set; } + public static string MergeRenamesTestRepoWorkingDirPath { get; private set; } public static string RevertTestRepoWorkingDirPath { get; private set; } public static string SubmoduleTestRepoWorkingDirPath { get; private set; } public static DirectoryInfo ResourcesDirectory { get; private set; } @@ -63,6 +64,7 @@ private static void SetUpTestEnvironment() StandardTestRepoPath = Path.Combine(StandardTestRepoWorkingDirPath, ".git"); ShallowTestRepoPath = Path.Combine(ResourcesDirectory.FullName, "shallow.git"); MergedTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "mergedrepo_wd"); + MergeRenamesTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "mergerenames_wd"); MergeTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "merge_testrepo_wd"); RevertTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "revert_testrepo_wd"); SubmoduleTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "submodule_wd"); @@ -126,6 +128,11 @@ protected string CloneMergedTestRepo() return Clone(MergedTestRepoWorkingDirPath); } + protected string CloneMergeRenamesTestRepo() + { + return Clone(MergeRenamesTestRepoWorkingDirPath); + } + protected string CloneMergeTestRepo() { return Clone(MergeTestRepoWorkingDirPath); diff --git a/LibGit2Sharp.Tests/TestHelpers/Constants.cs b/LibGit2Sharp.Tests/TestHelpers/Constants.cs index 6f72a587c..71f942a53 100644 --- a/LibGit2Sharp.Tests/TestHelpers/Constants.cs +++ b/LibGit2Sharp.Tests/TestHelpers/Constants.cs @@ -10,19 +10,24 @@ public static class Constants // Populate these to turn on live credential tests: set the // PrivateRepoUrl to the URL of a repository that requires - // authentication. Set PrivateRepoCredentials to an instance of + // authentication. Define PrivateRepoCredentials to return an instance of // UsernamePasswordCredentials (for HTTP Basic authentication) or // DefaultCredentials (for NTLM/Negotiate authentication). // // For example: // public const string PrivateRepoUrl = "https://github.com/username/PrivateRepo"; - // public static readonly Credentials PrivateRepoCredentials = new UsernamePasswordCredentials { Username = "username", Password = "swordfish" }; + // ... return new UsernamePasswordCredentials { Username = "username", Password = "swordfish" }; // // Or: // public const string PrivateRepoUrl = "https://tfs.contoso.com/tfs/DefaultCollection/project/_git/project"; - // public static readonly Credentials PrivateRepoCredentials = new DefaultCredentials(); + // ... return new DefaultCredentials(); public const string PrivateRepoUrl = ""; - public static readonly Credentials PrivateRepoCredentials; + + public static Credentials PrivateRepoCredentials(string url, string usernameFromUrl, + SupportedCredentialTypes types) + { + return null; + } } } diff --git a/LibGit2Sharp.Tests/UnstageFixture.cs b/LibGit2Sharp.Tests/UnstageFixture.cs index fea1aea3b..d58784423 100644 --- a/LibGit2Sharp.Tests/UnstageFixture.cs +++ b/LibGit2Sharp.Tests/UnstageFixture.cs @@ -50,7 +50,7 @@ public void CanStageAndUnstageAnIgnoredFile() Assert.Equal(FileStatus.Ignored, repo.Index.RetrieveStatus(relativePath)); - repo.Index.Stage(relativePath); + repo.Index.Stage(relativePath, new StageOptions { IncludeIgnored = true }); Assert.Equal(FileStatus.Added, repo.Index.RetrieveStatus(relativePath)); repo.Index.Unstage(relativePath); @@ -233,5 +233,60 @@ public void UnstagingFileWithBadParamsThrows() Assert.Throws(() => repo.Index.Unstage(new string[] { null })); } } + + [Fact] + public void CanUnstageSourceOfARename() + { + using (var repo = new Repository(CloneStandardTestRepo())) + { + repo.Index.Move("branch_file.txt", "renamed_branch_file.txt"); + + RepositoryStatus oldStatus = repo.Index.RetrieveStatus(); + Assert.Equal(1, oldStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.Nonexistent, oldStatus["branch_file.txt"].State); + Assert.Equal(FileStatus.RenamedInIndex, oldStatus["renamed_branch_file.txt"].State); + + repo.Index.Unstage(new string[] { "branch_file.txt" }); + + RepositoryStatus newStatus = repo.Index.RetrieveStatus(); + Assert.Equal(0, newStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.Missing, newStatus["branch_file.txt"].State); + Assert.Equal(FileStatus.Added, newStatus["renamed_branch_file.txt"].State); + } + } + + [Fact] + public void CanUnstageTargetOfARename() + { + using (var repo = new Repository(CloneStandardTestRepo())) + { + repo.Index.Move("branch_file.txt", "renamed_branch_file.txt"); + + RepositoryStatus oldStatus = repo.Index.RetrieveStatus(); + Assert.Equal(1, oldStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.RenamedInIndex, oldStatus["renamed_branch_file.txt"].State); + + repo.Index.Unstage(new string[] { "renamed_branch_file.txt" }); + + RepositoryStatus newStatus = repo.Index.RetrieveStatus(); + Assert.Equal(0, newStatus.RenamedInIndex.Count()); + Assert.Equal(FileStatus.Untracked, newStatus["renamed_branch_file.txt"].State); + Assert.Equal(FileStatus.Removed, newStatus["branch_file.txt"].State); + } + } + + [Fact] + public void CanUnstageBothSidesOfARename() + { + using (var repo = new Repository(CloneStandardTestRepo())) + { + repo.Index.Move("branch_file.txt", "renamed_branch_file.txt"); + repo.Index.Unstage(new string[] { "branch_file.txt", "renamed_branch_file.txt" }); + + RepositoryStatus status = repo.Index.RetrieveStatus(); + Assert.Equal(FileStatus.Missing, status["branch_file.txt"].State); + Assert.Equal(FileStatus.Untracked, status["renamed_branch_file.txt"].State); + } + } } } diff --git a/LibGit2Sharp/AmbiguousSpecificationException.cs b/LibGit2Sharp/AmbiguousSpecificationException.cs index ab0db742f..3b9024cf8 100644 --- a/LibGit2Sharp/AmbiguousSpecificationException.cs +++ b/LibGit2Sharp/AmbiguousSpecificationException.cs @@ -38,7 +38,7 @@ public AmbiguousSpecificationException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected AmbiguousSpecificationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/BareRepositoryException.cs b/LibGit2Sharp/BareRepositoryException.cs index 9ba6ee328..00b61a04b 100644 --- a/LibGit2Sharp/BareRepositoryException.cs +++ b/LibGit2Sharp/BareRepositoryException.cs @@ -40,7 +40,7 @@ public BareRepositoryException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected BareRepositoryException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/ChangeKind.cs b/LibGit2Sharp/ChangeKind.cs index 612e036d8..c95095a37 100644 --- a/LibGit2Sharp/ChangeKind.cs +++ b/LibGit2Sharp/ChangeKind.cs @@ -50,5 +50,10 @@ public enum ChangeKind /// of the file was changed. /// TypeChanged = 8, + + /// + /// Entry is unreadable. + /// + Unreadable = 9, } } diff --git a/LibGit2Sharp/CherryPickOptions.cs b/LibGit2Sharp/CherryPickOptions.cs new file mode 100644 index 000000000..05619f37b --- /dev/null +++ b/LibGit2Sharp/CherryPickOptions.cs @@ -0,0 +1,113 @@ +using LibGit2Sharp.Core; +using LibGit2Sharp.Handlers; + +namespace LibGit2Sharp +{ + /// + /// Options controlling CherryPick behavior. + /// + public sealed class CherryPickOptions : IConvertableToGitCheckoutOpts + { + /// + /// Initializes a new instance of the class. + /// By default the cherry pick will be committed if there are no conflicts. + /// + public CherryPickOptions() + { + CommitOnSuccess = true; + + FindRenames = true; + + // TODO: libgit2 should provide reasonable defaults for these + // values, but it currently does not. + RenameThreshold = 50; + TargetLimit = 200; + } + + /// + /// The Flags specifying what conditions are + /// reported through the OnCheckoutNotify delegate. + /// + public CheckoutNotifyFlags CheckoutNotifyFlags { get; set; } + + /// + /// Delegate that checkout progress will be reported through. + /// + public CheckoutProgressHandler OnCheckoutProgress { get; set; } + + /// + /// Delegate that checkout will notify callers of + /// certain conditions. The conditions that are reported is + /// controlled with the CheckoutNotifyFlags property. + /// + public CheckoutNotifyHandler OnCheckoutNotify { get; set; } + + /// + /// Commit the cherry pick if the cherry pick is successful. + /// + public bool CommitOnSuccess { get; set; } + + /// + /// When cherry picking a merge commit, the parent number to consider as + /// mainline, starting from offset 1. + /// + /// As a merge commit has multiple parents, cherry picking a merge commit + /// will reverse all the changes brought in by the merge except for + /// one parent's line of commits. The parent to preserve is called the + /// mainline, and must be specified by its number (i.e. offset). + /// + /// + public int Mainline { get; set; } + + /// + /// How to handle conflicts encountered during a merge. + /// + public MergeFileFavor MergeFileFavor { get; set; } + + /// + /// How Checkout should handle writing out conflicting index entries. + /// + public CheckoutFileConflictStrategy FileConflictStrategy { get; set; } + + /// + /// Find renames. Default is true. + /// + public bool FindRenames { get; set; } + + /// + /// Similarity to consider a file renamed (default 50). If + /// `FindRenames` is enabled, added files will be compared + /// with deleted files to determine their similarity. Files that are + /// more similar than the rename threshold (percentage-wise) will be + /// treated as a rename. + /// + public int RenameThreshold; + + /// + /// Maximum similarity sources to examine for renames (default 200). + /// If the number of rename candidates (add / delete pairs) is greater + /// than this value, inexact rename detection is aborted. + /// + /// This setting overrides the `merge.renameLimit` configuration value. + /// + public int TargetLimit; + + #region IConvertableToGitCheckoutOpts + + CheckoutCallbacks IConvertableToGitCheckoutOpts.GenerateCallbacks() + { + return CheckoutCallbacks.From(OnCheckoutProgress, OnCheckoutNotify); + } + + CheckoutStrategy IConvertableToGitCheckoutOpts.CheckoutStrategy + { + get + { + return CheckoutStrategy.GIT_CHECKOUT_SAFE | + GitCheckoutOptsWrapper.CheckoutStrategyFromFileConflictStrategy(FileConflictStrategy); + } + } + + #endregion IConvertableToGitCheckoutOpts + } +} diff --git a/LibGit2Sharp/CherryPickResult.cs b/LibGit2Sharp/CherryPickResult.cs new file mode 100644 index 000000000..b93de8df5 --- /dev/null +++ b/LibGit2Sharp/CherryPickResult.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; + +namespace LibGit2Sharp +{ + /// + /// Class to report the result of a cherry picked. + /// + public class CherryPickResult + { + /// + /// Needed for mocking purposes. + /// + protected CherryPickResult() + { } + + internal CherryPickResult(CherryPickStatus status, Commit commit = null) + { + Commit = commit; + Status = status; + } + + /// + /// The resulting commit of the cherry pick. + /// + /// This will return null if the cherry pick was not committed. + /// This can happen if: + /// 1) The cherry pick resulted in conflicts. + /// 2) The option to not commit on success is set. + /// + /// + public virtual Commit Commit { get; private set; } + + /// + /// The status of the cherry pick. + /// + public virtual CherryPickStatus Status { get; private set; } + } + + /// + /// The status of what happened as a result of a cherry-pick. + /// + public enum CherryPickStatus + { + /// + /// The commit was successfully cherry picked. + /// + CherryPicked, + + /// + /// The cherry pick resulted in conflicts. + /// + Conflicts + } +} diff --git a/LibGit2Sharp/CloneOptions.cs b/LibGit2Sharp/CloneOptions.cs index 65b98bd04..7a1fc785d 100644 --- a/LibGit2Sharp/CloneOptions.cs +++ b/LibGit2Sharp/CloneOptions.cs @@ -1,4 +1,5 @@ -using LibGit2Sharp.Core; +using System; +using LibGit2Sharp.Core; using LibGit2Sharp.Handlers; namespace LibGit2Sharp @@ -6,7 +7,7 @@ namespace LibGit2Sharp /// /// Options to define clone behaviour /// - public sealed class CloneOptions : IConvertableToGitCheckoutOpts + public sealed class CloneOptions : IConvertableToGitCheckoutOpts, ICredentialsProvider { /// /// Creates default for a non-bare clone @@ -40,8 +41,14 @@ public CloneOptions() /// /// Credentials to use for user/pass authentication /// + [Obsolete("This will be removed in future release. Use CredentialsProvider.")] public Credentials Credentials { get; set; } + /// + /// Handler to generate for authentication. + /// + public CredentialsHandler CredentialsProvider { get; set; } + #region IConvertableToGitCheckoutOpts CheckoutCallbacks IConvertableToGitCheckoutOpts.GenerateCallbacks() diff --git a/LibGit2Sharp/ConflictCollection.cs b/LibGit2Sharp/ConflictCollection.cs index ff54ee2e0..ba8bb8c37 100644 --- a/LibGit2Sharp/ConflictCollection.cs +++ b/LibGit2Sharp/ConflictCollection.cs @@ -40,7 +40,31 @@ public virtual Conflict this[string path] } } - #region IEnumerable Members + /// + /// Get the that contains + /// the list of conflicts that have been resolved. + /// + public virtual IndexReucEntryCollection ResolvedConflicts + { + get + { + return new IndexReucEntryCollection(repo); + } + } + + /// + /// Get the that contains + /// the list of paths involved in rename conflicts. + /// + public virtual IndexNameEntryCollection Names + { + get + { + return new IndexNameEntryCollection(repo); + } + } + + #region IEnumerable Members private List AllConflicts() { diff --git a/LibGit2Sharp/Core/Ensure.cs b/LibGit2Sharp/Core/Ensure.cs index 19925489e..5e7ea30b3 100644 --- a/LibGit2Sharp/Core/Ensure.cs +++ b/LibGit2Sharp/Core/Ensure.cs @@ -1,4 +1,6 @@ using System; +using System.Linq; +using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; @@ -24,6 +26,21 @@ public static void ArgumentNotNull(object argumentValue, string argumentName) } } + /// + /// Checks an array argument to ensure it isn't null or empty. + /// + /// The argument value to check. + /// The name of the argument. + public static void ArgumentNotNullOrEmptyEnumerable(IEnumerable argumentValue, string argumentName) + { + ArgumentNotNull(argumentValue, argumentName); + + if (argumentValue.Count() == 0) + { + throw new ArgumentException("Enumerable cannot be empty", argumentName); + } + } + /// /// Checks a string argument to ensure it isn't null or empty. /// @@ -101,12 +118,12 @@ private static void HandleError(int result) } Func exceptionBuilder; - if (!GitErrorsToLibGit2SharpExceptions.TryGetValue((GitErrorCode) result, out exceptionBuilder)) + if (!GitErrorsToLibGit2SharpExceptions.TryGetValue((GitErrorCode)result, out exceptionBuilder)) { exceptionBuilder = (m, r, c) => new LibGit2SharpException(m, r, c); } - throw exceptionBuilder(errorMessage, (GitErrorCode) result, error.Category); + throw exceptionBuilder(errorMessage, (GitErrorCode)result, error.Category); } /// @@ -165,6 +182,16 @@ public static void Int32Result(int result) HandleError(result); } + public static void NotNullResult(Object result) + { + if (result != null) + { + return; + } + + HandleError((int)GitErrorCode.Error); + } + /// /// Checks an argument by applying provided checker. /// @@ -182,13 +209,32 @@ public static void ArgumentConformsTo(T argumentValue, Func checker, } public static void GitObjectIsNotNull(GitObject gitObject, string identifier) + { + Func exceptionBuilder; + + if (string.Equals("HEAD", identifier, StringComparison.Ordinal)) + { + exceptionBuilder = m => new UnbornBranchException(m); + } + else + { + exceptionBuilder = m => new LibGit2SharpException(m); + } + + GitObjectIsNotNull(gitObject, identifier, exceptionBuilder); + } + + public static void GitObjectIsNotNull( + GitObject gitObject, + string identifier, + Func exceptionBuilder) { if (gitObject != null) { return; } - throw new LibGit2SharpException(string.Format(CultureInfo.InvariantCulture, + throw exceptionBuilder(string.Format(CultureInfo.InvariantCulture, "No valid git object identified by '{0}' exists in the repository.", identifier)); } diff --git a/LibGit2Sharp/Core/GitCheckoutOpts.cs b/LibGit2Sharp/Core/GitCheckoutOpts.cs index 214251d60..dfedca458 100644 --- a/LibGit2Sharp/Core/GitCheckoutOpts.cs +++ b/LibGit2Sharp/Core/GitCheckoutOpts.cs @@ -138,7 +138,7 @@ internal struct GitCheckoutOpts public progress_cb progress_cb; public IntPtr progress_payload; - public GitStrArrayIn paths; + public GitStrArray paths; public IntPtr baseline; public IntPtr target_directory; @@ -160,4 +160,50 @@ internal interface IConvertableToGitCheckoutOpts CheckoutNotifyFlags CheckoutNotifyFlags { get; } } + + /// + /// This wraps an IConvertableToGitCheckoutOpts object and can tweak the + /// properties so that they are appropriate for a checkout performed as + /// part of a FastForward merge. Most properties are passthrough to the + /// wrapped object. + /// + internal class FastForwardCheckoutOptionsAdapter : IConvertableToGitCheckoutOpts + { + private IConvertableToGitCheckoutOpts internalOptions; + + internal FastForwardCheckoutOptionsAdapter(IConvertableToGitCheckoutOpts internalOptions) + { + this.internalOptions = internalOptions; + } + + /// + /// Passthrough to the wrapped object. + /// + /// + public CheckoutCallbacks GenerateCallbacks() + { + return internalOptions.GenerateCallbacks(); + } + + /// + /// There should be no resolvable conflicts in a FastForward merge. + /// Just perform checkout with the safe checkout strategy. + /// + public CheckoutStrategy CheckoutStrategy + { + get + { + return CheckoutStrategy.GIT_CHECKOUT_SAFE; + } + } + + /// + /// Passthrough to the wrapped object. + /// + /// + public CheckoutNotifyFlags CheckoutNotifyFlags + { + get { return internalOptions.CheckoutNotifyFlags; } + } + } } diff --git a/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs b/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs index b98a5cd96..7fda697a4 100644 --- a/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs +++ b/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs @@ -22,7 +22,7 @@ public GitCheckoutOptsWrapper(IConvertableToGitCheckoutOpts options, FilePath[] if (paths != null) { - PathArray = GitStrArrayIn.BuildFrom(paths); + PathArray = GitStrArrayManaged.BuildFrom(paths); } Options = new GitCheckoutOpts @@ -32,7 +32,7 @@ public GitCheckoutOptsWrapper(IConvertableToGitCheckoutOpts options, FilePath[] progress_cb = Callbacks.CheckoutProgressCallback, notify_cb = Callbacks.CheckoutNotifyCallback, notify_flags = options.CheckoutNotifyFlags, - paths = PathArray, + paths = PathArray.Array, }; } @@ -50,23 +50,11 @@ public GitCheckoutOptsWrapper(IConvertableToGitCheckoutOpts options, FilePath[] /// /// Keep the paths around so we can dispose them. /// - private GitStrArrayIn PathArray; + private GitStrArrayManaged PathArray; public void Dispose() { - Dispose(true); - } - - private void Dispose(bool disposing) - { - if (disposing) - { - if (PathArray != null) - { - PathArray.Dispose(); - PathArray = null; - } - } + PathArray.Dispose(); } /// diff --git a/LibGit2Sharp/Core/GitCherryPickOptions.cs b/LibGit2Sharp/Core/GitCherryPickOptions.cs new file mode 100644 index 000000000..b06f22a7d --- /dev/null +++ b/LibGit2Sharp/Core/GitCherryPickOptions.cs @@ -0,0 +1,18 @@ +using System; +using System.Runtime.InteropServices; + +namespace LibGit2Sharp.Core +{ + [StructLayout(LayoutKind.Sequential)] + internal class GitCherryPickOptions + { + public uint Version = 1; + + // For merge commits, the "mainline" is treated as the parent + public uint Mainline = 0; + + public GitMergeOpts MergeOpts = new GitMergeOpts { Version = 1 }; + + public GitCheckoutOpts CheckoutOpts = new GitCheckoutOpts { version = 1 }; + } +} diff --git a/LibGit2Sharp/Core/GitCloneOptions.cs b/LibGit2Sharp/Core/GitCloneOptions.cs index 915c56b12..803bc8b3c 100644 --- a/LibGit2Sharp/Core/GitCloneOptions.cs +++ b/LibGit2Sharp/Core/GitCloneOptions.cs @@ -20,11 +20,15 @@ internal struct GitCloneOptions public GitRemoteCallbacks RemoteCallbacks; public int Bare; - public int IgnoreCertErrors; public GitCloneLocal Local; - - public IntPtr RemoteName; public IntPtr CheckoutBranch; + public IntPtr signature; // Really a SignatureSafeHandle + + public IntPtr RepositoryCb; + public IntPtr RepositoryCbPayload; + + public IntPtr RemoteCb; + public IntPtr RemoteCbPayload; } } diff --git a/LibGit2Sharp/Core/GitDiff.cs b/LibGit2Sharp/Core/GitDiff.cs index 4ef6a251f..27b5fab19 100644 --- a/LibGit2Sharp/Core/GitDiff.cs +++ b/LibGit2Sharp/Core/GitDiff.cs @@ -112,6 +112,16 @@ internal enum GitDiffOptionFlags /// GIT_DIFF_UPDATE_INDEX = (1 << 15), + /// + /// Include unreadable files in the diff + /// + GIT_DIFF_INCLUDE_UNREADABLE = (1 << 16), + + /// + /// Include unreadable files in the diff + /// + GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED = (1 << 17), + /* * Options controlling how output will be generated */ @@ -189,7 +199,7 @@ internal class GitDiffOptions : IDisposable /* options controlling which files are in the diff */ public SubmoduleIgnore IgnoreSubmodules; - public GitStrArrayIn PathSpec; + public GitStrArrayManaged PathSpec; public diff_notify_cb NotifyCallback; public IntPtr NotifyPayload; @@ -204,11 +214,6 @@ internal class GitDiffOptions : IDisposable public void Dispose() { - if (PathSpec == null) - { - return; - } - PathSpec.Dispose(); } } diff --git a/LibGit2Sharp/Core/GitIndexNameEntry.cs b/LibGit2Sharp/Core/GitIndexNameEntry.cs new file mode 100644 index 000000000..251a00791 --- /dev/null +++ b/LibGit2Sharp/Core/GitIndexNameEntry.cs @@ -0,0 +1,13 @@ +using System; +using System.Runtime.InteropServices; + +namespace LibGit2Sharp.Core +{ + [StructLayout(LayoutKind.Sequential)] + internal class GitIndexNameEntry + { + public IntPtr Ancestor; + public IntPtr Ours; + public IntPtr Theirs; + } +} diff --git a/LibGit2Sharp/Core/GitIndexReucEntry.cs b/LibGit2Sharp/Core/GitIndexReucEntry.cs new file mode 100644 index 000000000..dfd684edb --- /dev/null +++ b/LibGit2Sharp/Core/GitIndexReucEntry.cs @@ -0,0 +1,17 @@ +using System; +using System.Runtime.InteropServices; + +namespace LibGit2Sharp.Core +{ + [StructLayout(LayoutKind.Sequential)] + internal class GitIndexReucEntry + { + public uint AncestorMode; + public uint OurMode; + public uint TheirMode; + public GitOid AncestorId; + public GitOid OurId; + public GitOid TheirId; + public IntPtr Path; + } +} diff --git a/LibGit2Sharp/Core/GitOdbBackend.cs b/LibGit2Sharp/Core/GitOdbBackend.cs index 4f69ac70f..a7b0acf41 100644 --- a/LibGit2Sharp/Core/GitOdbBackend.cs +++ b/LibGit2Sharp/Core/GitOdbBackend.cs @@ -30,7 +30,7 @@ static GitOdbBackend() public writestream_callback WriteStream; public readstream_callback ReadStream; public exists_callback Exists; - public IntPtr ExistsPrefix; + public exists_prefix_callback ExistsPrefix; public IntPtr Refresh; public foreach_callback Foreach; public IntPtr Writepack; @@ -157,6 +157,23 @@ public delegate bool exists_callback( IntPtr backend, ref GitOid oid); + /// + /// The backend is passed a short OID and the number of characters in that short OID. + /// The backend is asked to return a value that indicates whether or not + /// the object exists in the backing store. The short OID might not be long enough to resolve + /// to just one object. In that case the backend should return GIT_EAMBIGUOUS. + /// + /// [out] If the call is successful, the backend will write the full OID if the object here. + /// [in] A pointer to the backend which is being asked to perform the task. + /// [in] The short-form OID which the backend is being asked to look up. + /// [in] The length of the short-form OID (short_oid). + /// 1 if the object exists, 0 if the object doesn't; an error code otherwise. + public delegate int exists_prefix_callback( + ref GitOid found_oid, + IntPtr backend, + ref GitOid short_oid, + UIntPtr len); + /// /// The backend is passed a callback function and a void* to pass through to the callback. The backend is /// asked to iterate through all objects in the backing store, invoking the callback for each item. diff --git a/LibGit2Sharp/Core/GitStatusOptions.cs b/LibGit2Sharp/Core/GitStatusOptions.cs index ce8504109..bc0956e8f 100644 --- a/LibGit2Sharp/Core/GitStatusOptions.cs +++ b/LibGit2Sharp/Core/GitStatusOptions.cs @@ -14,15 +14,10 @@ internal class GitStatusOptions : IDisposable public GitStatusShow Show; public GitStatusOptionFlags Flags; - GitStrArrayIn PathSpec; + GitStrArrayManaged PathSpec; public void Dispose() { - if (PathSpec == null) - { - return; - } - PathSpec.Dispose(); } } @@ -51,5 +46,7 @@ internal enum GitStatusOptionFlags RenamesFromRewrites = (1 << 11), NoRefresh = (1 << 12), UpdateIndex = (1 << 13), + IncludeUnreadable = (1 << 14), + IncludeUnreadableAsUntracked = (1 << 15), } } diff --git a/LibGit2Sharp/Core/GitStrArray.cs b/LibGit2Sharp/Core/GitStrArray.cs new file mode 100644 index 000000000..a94187e1b --- /dev/null +++ b/LibGit2Sharp/Core/GitStrArray.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +namespace LibGit2Sharp.Core +{ + [StructLayout(LayoutKind.Sequential)] + internal struct GitStrArray + { + /// + /// A pointer to an array of null-terminated strings. + /// + public IntPtr Strings; + + /// + /// The number of strings in the array. + /// + public UIntPtr Count; + + /// + /// Resets the GitStrArray to default values. + /// + public void Reset() + { + Strings = IntPtr.Zero; + Count = UIntPtr.Zero; + } + } +} diff --git a/LibGit2Sharp/Core/GitStrArrayIn.cs b/LibGit2Sharp/Core/GitStrArrayIn.cs deleted file mode 100644 index 9abfcf3f9..000000000 --- a/LibGit2Sharp/Core/GitStrArrayIn.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace LibGit2Sharp.Core -{ - [StructLayout(LayoutKind.Sequential)] - internal class GitStrArrayIn : IDisposable - { - public IntPtr strings; - public uint size; - - public static GitStrArrayIn BuildFrom(string[] strings) - { - return BuildFrom(strings, StrictUtf8Marshaler.FromManaged); - } - - public static GitStrArrayIn BuildFrom(FilePath[] paths) - { - return BuildFrom(paths, StrictFilePathMarshaler.FromManaged); - } - - private static GitStrArrayIn BuildFrom(T[] input, Func marshaler) - { - var count = input.Length; - var pointers = new IntPtr[count]; - - for (int i = 0; i < count; i++) - { - var item = input[i]; - pointers[i] = marshaler(item); - } - - int dim = IntPtr.Size * count; - - IntPtr arrayPtr = Marshal.AllocHGlobal(dim); - Marshal.Copy(pointers, 0, arrayPtr, count); - - return new GitStrArrayIn { strings = arrayPtr, size = (uint)count }; - } - - public void Dispose() - { - if (size == 0) - { - return; - } - - var count = (int)size; - - var pointers = new IntPtr[count]; - Marshal.Copy(strings, pointers, 0, count); - - for (int i = 0; i < count; i++) - { - EncodingMarshaler.Cleanup(pointers[i]); - } - - Marshal.FreeHGlobal(strings); - size = 0; - } - } -} diff --git a/LibGit2Sharp/Core/GitStrArrayManaged.cs b/LibGit2Sharp/Core/GitStrArrayManaged.cs new file mode 100644 index 000000000..320221fcf --- /dev/null +++ b/LibGit2Sharp/Core/GitStrArrayManaged.cs @@ -0,0 +1,62 @@ +using System; +using System.Runtime.InteropServices; + +namespace LibGit2Sharp.Core +{ + /// + /// A git_strarray where the string array and strings themselves were allocated + /// with LibGit2Sharp's allocator (Marshal.AllocHGlobal). + /// + [StructLayout(LayoutKind.Sequential)] + internal struct GitStrArrayManaged : IDisposable + { + public GitStrArray Array; + + public static GitStrArrayManaged BuildFrom(string[] strings) + { + return BuildFrom(strings, StrictUtf8Marshaler.FromManaged); + } + + public static GitStrArrayManaged BuildFrom(FilePath[] paths) + { + return BuildFrom(paths, StrictFilePathMarshaler.FromManaged); + } + + private static GitStrArrayManaged BuildFrom(T[] input, Func marshaler) + { + var pointers = new IntPtr[input.Length]; + + for (int i = 0; i < input.Length; i++) + { + var item = input[i]; + pointers[i] = marshaler(item); + } + + var toReturn = new GitStrArrayManaged(); + + toReturn.Array.Strings = Marshal.AllocHGlobal(checked(IntPtr.Size * input.Length)); + Marshal.Copy(pointers, 0, toReturn.Array.Strings, input.Length); + toReturn.Array.Count = new UIntPtr((uint)input.Length); + + return toReturn; + } + + public void Dispose() + { + var count = checked((int)Array.Count.ToUInt32()); + + for (int i = 0; i < count; i++) + { + EncodingMarshaler.Cleanup(Marshal.ReadIntPtr(Array.Strings, i * IntPtr.Size)); + } + + if (Array.Strings != IntPtr.Zero) + { + Marshal.FreeHGlobal(Array.Strings); + } + + // Now that we've freed the memory, zero out the structure. + Array.Reset(); + } + } +} diff --git a/LibGit2Sharp/Core/GitStrArrayNative.cs b/LibGit2Sharp/Core/GitStrArrayNative.cs new file mode 100644 index 000000000..2db550c0f --- /dev/null +++ b/LibGit2Sharp/Core/GitStrArrayNative.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace LibGit2Sharp.Core +{ + /// + /// A git_strarray where the string array and strings themselves were allocated + /// with libgit2's allocator. Only libgit2 can free this git_strarray. + /// + [StructLayout(LayoutKind.Sequential)] + internal struct GitStrArrayNative : IDisposable + { + public GitStrArray Array; + + /// + /// Enumerates each string from the array using the UTF-8 marshaler. + /// + public String[] ReadStrings() + { + var count = checked((int)Array.Count.ToUInt32()); + + String[] toReturn = new String[count]; + + for (int i = 0; i < count; i++) + { + toReturn[i] = LaxUtf8Marshaler.FromNative(Marshal.ReadIntPtr(Array.Strings, i * IntPtr.Size)); + } + + return toReturn; + } + + public void Dispose() + { + if (Array.Strings != IntPtr.Zero) + { + NativeMethods.git_strarray_free(ref Array); + } + + // Now that we've freed the memory, zero out the structure. + Array.Reset(); + } + } +} diff --git a/LibGit2Sharp/Core/Handles/IndexNameEntrySafeHandle.cs b/LibGit2Sharp/Core/Handles/IndexNameEntrySafeHandle.cs new file mode 100644 index 000000000..549d41e6a --- /dev/null +++ b/LibGit2Sharp/Core/Handles/IndexNameEntrySafeHandle.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace LibGit2Sharp.Core.Handles +{ + internal class IndexNameEntrySafeHandle : NotOwnedSafeHandleBase + { + public GitIndexNameEntry MarshalAsGitIndexNameEntry() + { + return handle.MarshalAs(); + } + } +} diff --git a/LibGit2Sharp/Core/Handles/IndexReucEntrySafeHandle.cs b/LibGit2Sharp/Core/Handles/IndexReucEntrySafeHandle.cs new file mode 100644 index 000000000..ec006b39a --- /dev/null +++ b/LibGit2Sharp/Core/Handles/IndexReucEntrySafeHandle.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace LibGit2Sharp.Core.Handles +{ + internal class IndexReucEntrySafeHandle : NotOwnedSafeHandleBase + { + public GitIndexReucEntry MarshalAsGitIndexReucEntry() + { + return handle.MarshalAs(); + } + } +} diff --git a/LibGit2Sharp/Core/NativeDllName.cs b/LibGit2Sharp/Core/NativeDllName.cs index 5fd4f2b5a..62603ace9 100644 --- a/LibGit2Sharp/Core/NativeDllName.cs +++ b/LibGit2Sharp/Core/NativeDllName.cs @@ -2,6 +2,6 @@ namespace LibGit2Sharp.Core { internal static class NativeDllName { - public const string Name = "git2-90befde"; + public const string Name = "git2-69db893"; } } diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs index faf1e02b5..9a3d72076 100644 --- a/LibGit2Sharp/Core/NativeMethods.cs +++ b/LibGit2Sharp/Core/NativeMethods.cs @@ -212,6 +212,22 @@ internal static extern int git_branch_remote_name( RepositorySafeHandle repo, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string canonical_branch_name); + [DllImport(libgit2)] + internal static extern int git_remote_rename( + ref GitStrArray problems, + RemoteSafeHandle remote, + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string new_name); + + internal delegate int git_remote_rename_problem_cb( + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(LaxUtf8NoCleanupMarshaler))] string problematic_refspec, + IntPtr payload); + + + [DllImport(libgit2)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern bool git_remote_supported_url( + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string url); + [DllImport(libgit2)] internal static extern int git_branch_upstream_name( GitBuf buf, @@ -554,6 +570,12 @@ internal static extern IndexEntrySafeHandle git_index_get_bypath( [DllImport(libgit2)] internal static extern int git_index_has_conflicts(IndexSafeHandle index); + [DllImport(libgit2)] + internal static extern uint git_index_name_entrycount(IndexSafeHandle handle); + + [DllImport(libgit2)] + internal static extern IndexNameEntrySafeHandle git_index_name_get_byindex(IndexSafeHandle handle, UIntPtr n); + [DllImport(libgit2)] internal static extern int git_index_open( out IndexSafeHandle index, @@ -569,6 +591,18 @@ internal static extern int git_index_remove_bypath( IndexSafeHandle index, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictFilePathMarshaler))] FilePath path); + + [DllImport(libgit2)] + internal static extern uint git_index_reuc_entrycount(IndexSafeHandle handle); + + [DllImport(libgit2)] + internal static extern IndexReucEntrySafeHandle git_index_reuc_get_byindex(IndexSafeHandle handle, UIntPtr n); + + [DllImport(libgit2)] + internal static extern IndexReucEntrySafeHandle git_index_reuc_get_bypath( + IndexSafeHandle handle, + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictFilePathMarshaler))] FilePath path); + [DllImport(libgit2)] internal static extern int git_index_write(IndexSafeHandle index); @@ -742,6 +776,11 @@ internal static extern int git_object_peel( GitObjectSafeHandle obj, GitObjectType type); + [DllImport(libgit2)] + internal static extern int git_object_short_id( + GitBuf buf, + GitObjectSafeHandle obj); + [DllImport(libgit2)] internal static extern GitObjectType git_object_type(GitObjectSafeHandle obj); @@ -848,6 +887,9 @@ internal static extern int git_reference_foreach_glob( internal static extern int git_reference_is_valid_name( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string refname); + [DllImport(libgit2)] + internal static extern int git_reference_list(out GitStrArray array, RepositorySafeHandle repo); + [DllImport(libgit2)] internal static extern int git_reference_lookup( out ReferenceSafeHandle reference, @@ -1009,22 +1051,31 @@ internal static extern int git_remote_fetch( [DllImport(libgit2)] internal static extern void git_remote_free(IntPtr remote); + [DllImport(libgit2)] + internal static extern int git_remote_get_fetch_refspecs(out GitStrArray array, RemoteSafeHandle remote); + [DllImport(libgit2)] internal static extern GitRefSpecHandle git_remote_get_refspec(RemoteSafeHandle remote, UIntPtr n); + [DllImport(libgit2)] + internal static extern int git_remote_get_push_refspecs(out GitStrArray array, RemoteSafeHandle remote); + [DllImport(libgit2)] internal static extern UIntPtr git_remote_refspec_count(RemoteSafeHandle remote); [DllImport(libgit2)] - internal static extern int git_remote_set_fetch_refspecs(RemoteSafeHandle remote, GitStrArrayIn array); + internal static extern int git_remote_set_fetch_refspecs(RemoteSafeHandle remote, ref GitStrArray array); [DllImport(libgit2)] - internal static extern int git_remote_set_push_refspecs(RemoteSafeHandle remote, GitStrArrayIn array); + internal static extern int git_remote_set_push_refspecs(RemoteSafeHandle remote, ref GitStrArray array); [DllImport(libgit2)] internal static extern int git_remote_is_valid_name( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string remote_name); + [DllImport(libgit2)] + internal static extern int git_remote_list(out GitStrArray array, RepositorySafeHandle repo); + [DllImport(libgit2)] internal static extern int git_remote_load( out RemoteSafeHandle remote, @@ -1292,6 +1343,10 @@ internal static extern StatusEntrySafeHandle git_status_byindex( internal static extern void git_status_list_free( IntPtr statusList); + [DllImport(libgit2)] + internal static extern void git_strarray_free( + ref GitStrArray array); + [DllImport(libgit2)] internal static extern int git_submodule_lookup( out SubmoduleSafeHandle reference, @@ -1400,6 +1455,9 @@ internal static extern int git_tag_delete( RepositorySafeHandle repo, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string tagName); + [DllImport(libgit2)] + internal static extern int git_tag_list(out GitStrArray array, RepositorySafeHandle repo); + [DllImport(libgit2)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(LaxUtf8NoCleanupMarshaler))] internal static extern string git_tag_message(GitObjectSafeHandle tag); @@ -1472,6 +1530,9 @@ internal static extern int git_treebuilder_insert( [DllImport(libgit2)] internal static extern int git_blob_is_binary(GitObjectSafeHandle blob); + + [DllImport(libgit2)] + internal static extern int git_cherrypick(RepositorySafeHandle repo, GitObjectSafeHandle commit, GitCherryPickOptions options); } } // ReSharper restore InconsistentNaming diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs index e6b3940b2..5ab210936 100644 --- a/LibGit2Sharp/Core/Proxy.cs +++ b/LibGit2Sharp/Core/Proxy.cs @@ -6,6 +6,7 @@ using System.Runtime.InteropServices; using System.Threading; using LibGit2Sharp.Core.Handles; +using LibGit2Sharp.Handlers; // ReSharper disable InconsistentNaming namespace LibGit2Sharp.Core @@ -72,7 +73,7 @@ public static ObjectId git_blob_create_fromchunks(RepositorySafeHandle repo, Fil if (res == (int)GitErrorCode.User) { - throw new EndOfStreamException("The stream ended unexpectedly"); + throw new EndOfStreamException("The stream ended unexpectedly"); } Ensure.ZeroResult(res); @@ -162,7 +163,6 @@ public static void git_branch_delete(ReferenceSafeHandle reference) { int res = NativeMethods.git_branch_delete(reference); Ensure.ZeroResult(res); - reference.SetHandleAsInvalid(); } } @@ -268,6 +268,19 @@ public static void git_checkout_index(RepositorySafeHandle repo, GitObjectSafeHa #endregion + #region git_cherry_pick_ + + internal static void git_cherrypick(RepositorySafeHandle repo, ObjectId commit, GitCherryPickOptions options) + { + using (ThreadAffinity()) + using (var nativeCommit = git_object_lookup(repo, commit, GitObjectType.Commit)) + { + int res = NativeMethods.git_cherrypick(repo, nativeCommit, options); + Ensure.ZeroResult(res); + } + } + #endregion + #region git_clone_ public static RepositorySafeHandle git_clone( @@ -885,6 +898,21 @@ public static bool git_index_has_conflicts(IndexSafeHandle index) return res != 0; } + public static int git_index_name_entrycount(IndexSafeHandle index) + { + uint count = NativeMethods.git_index_name_entrycount(index); + if ((long)count > int.MaxValue) + { + throw new LibGit2SharpException("Index name entry count exceeds size of int"); + } + return (int)count; + } + + public static IndexNameEntrySafeHandle git_index_name_get_byindex(IndexSafeHandle index, UIntPtr n) + { + return NativeMethods.git_index_name_get_byindex(index, n); + } + public static IndexSafeHandle git_index_open(FilePath indexpath) { using (ThreadAffinity()) @@ -915,6 +943,26 @@ public static void git_index_remove_bypath(IndexSafeHandle index, FilePath path) } } + public static int git_index_reuc_entrycount(IndexSafeHandle index) + { + uint count = NativeMethods.git_index_reuc_entrycount(index); + if ((long)count > int.MaxValue) + { + throw new LibGit2SharpException("Index REUC entry count exceeds size of int"); + } + return (int)count; + } + + public static IndexReucEntrySafeHandle git_index_reuc_get_byindex(IndexSafeHandle index, UIntPtr n) + { + return NativeMethods.git_index_reuc_get_byindex(index, n); + } + + public static IndexReucEntrySafeHandle git_index_reuc_get_bypath(IndexSafeHandle index, string path) + { + return NativeMethods.git_index_reuc_get_bypath(index, path); + } + public static void git_index_write(IndexSafeHandle index) { using (ThreadAffinity()) @@ -1251,6 +1299,19 @@ public static GitObjectSafeHandle git_object_peel(RepositorySafeHandle repo, Obj } } + public static string git_object_short_id(RepositorySafeHandle repo, ObjectId id) + { + using (ThreadAffinity()) + using (var obj = new ObjectSafeWrapper(id, repo)) + using (var buf = new GitBuf()) + { + int res = NativeMethods.git_object_short_id(buf, obj.ObjectPtr); + Ensure.Int32Result(res); + + return LaxUtf8Marshaler.FromNative(buf.ptr); + } + } + public static GitObjectType git_object_type(GitObjectSafeHandle obj) { return NativeMethods.git_object_type(obj); @@ -1536,11 +1597,19 @@ public static IList git_reference_list(RepositorySafeHandle repo) { using (ThreadAffinity()) { - UnSafeNativeMethods.git_strarray arr; - int res = UnSafeNativeMethods.git_reference_list(out arr, repo); - Ensure.ZeroResult(res); + var array = new GitStrArrayNative(); + + try + { + int res = NativeMethods.git_reference_list(out array.Array, repo); + Ensure.ZeroResult(res); - return Libgit2UnsafeHelper.BuildListOf(arr); + return array.ReadStrings(); + } + finally + { + array.Dispose(); + } } } @@ -1804,7 +1873,6 @@ public static void git_remote_delete(RepositorySafeHandle repo, string name) int res = NativeMethods.git_remote_delete(remote); Ensure.ZeroResult(res); - remote.SetHandleAsInvalid(); } } } @@ -1831,11 +1899,19 @@ public static IList git_remote_get_fetch_refspecs(RemoteSafeHandle remot { using (ThreadAffinity()) { - UnSafeNativeMethods.git_strarray arr; - int res = UnSafeNativeMethods.git_remote_get_fetch_refspecs(out arr, remote); - Ensure.ZeroResult(res); + var array = new GitStrArrayNative(); - return Libgit2UnsafeHelper.BuildListOf(arr); + try + { + int res = NativeMethods.git_remote_get_fetch_refspecs(out array.Array, remote); + Ensure.ZeroResult(res); + + return array.ReadStrings(); + } + finally + { + array.Dispose(); + } } } @@ -1843,31 +1919,59 @@ public static IList git_remote_get_push_refspecs(RemoteSafeHandle remote { using (ThreadAffinity()) { - UnSafeNativeMethods.git_strarray arr; - int res = UnSafeNativeMethods.git_remote_get_push_refspecs(out arr, remote); - Ensure.ZeroResult(res); + var array = new GitStrArrayNative(); - return Libgit2UnsafeHelper.BuildListOf(arr); + try + { + int res = NativeMethods.git_remote_get_push_refspecs(out array.Array, remote); + Ensure.ZeroResult(res); + + return array.ReadStrings(); + } + finally + { + array.Dispose(); + } } } public static void git_remote_set_fetch_refspecs(RemoteSafeHandle remote, IEnumerable refSpecs) { using (ThreadAffinity()) - using (GitStrArrayIn array = GitStrArrayIn.BuildFrom(refSpecs.ToArray())) { - int res = NativeMethods.git_remote_set_fetch_refspecs(remote, array); - Ensure.ZeroResult(res); + var array = new GitStrArrayManaged(); + + try + { + array = GitStrArrayManaged.BuildFrom(refSpecs.ToArray()); + + int res = NativeMethods.git_remote_set_fetch_refspecs(remote, ref array.Array); + Ensure.ZeroResult(res); + } + finally + { + array.Dispose(); + } } } public static void git_remote_set_push_refspecs(RemoteSafeHandle remote, IEnumerable refSpecs) { using (ThreadAffinity()) - using (GitStrArrayIn array = GitStrArrayIn.BuildFrom(refSpecs.ToArray())) { - int res = NativeMethods.git_remote_set_push_refspecs(remote, array); - Ensure.ZeroResult(res); + var array = new GitStrArrayManaged(); + + try + { + array = GitStrArrayManaged.BuildFrom(refSpecs.ToArray()); + + int res = NativeMethods.git_remote_set_push_refspecs(remote, ref array.Array); + Ensure.ZeroResult(res); + } + finally + { + array.Dispose(); + } } } @@ -1898,30 +2002,47 @@ public static IList git_remote_list(RepositorySafeHandle repo) { using (ThreadAffinity()) { - UnSafeNativeMethods.git_strarray arr; - int res = UnSafeNativeMethods.git_remote_list(out arr, repo); - Ensure.ZeroResult(res); + var array = new GitStrArrayNative(); - return Libgit2UnsafeHelper.BuildListOf(arr); + try + { + int res = NativeMethods.git_remote_list(out array.Array, repo); + Ensure.ZeroResult(res); + + return array.ReadStrings(); + } + finally + { + array.Dispose(); + } } } public static IEnumerable git_remote_ls(Repository repository, RemoteSafeHandle remote) { - var refs = new List(); IntPtr heads; - UIntPtr size; + UIntPtr count; using (ThreadAffinity()) { - int res = NativeMethods.git_remote_ls(out heads, out size, remote); + int res = NativeMethods.git_remote_ls(out heads, out count, remote); Ensure.ZeroResult(res); } - var grheads = Libgit2UnsafeHelper.RemoteLsHelper(heads, size); + var intCount = (int)count.ToUInt32(); - foreach (var remoteHead in grheads) + if (intCount < 0) { + throw new OverflowException(); + } + + var refs = new List(); + IntPtr currentHead = heads; + + for (int i = 0; i < intCount; i++) + { + var remoteHead = Marshal.ReadIntPtr(currentHead).MarshalAs(); + // The name pointer should never be null - if it is, // this indicates a bug somewhere (libgit2, server, etc). if (remoteHead.NamePtr == IntPtr.Zero) @@ -1931,6 +2052,8 @@ public static IEnumerable git_remote_ls(Repository repository, string name = LaxUtf8Marshaler.FromNative(remoteHead.NamePtr); refs.Add(new DirectReference(name, repository, remoteHead.Oid)); + + currentHead = IntPtr.Add(currentHead, IntPtr.Size); } return refs; @@ -1958,6 +2081,46 @@ public static string git_remote_name(RemoteSafeHandle remote) return NativeMethods.git_remote_name(remote); } + public static void git_remote_rename(RepositorySafeHandle repo, string name, string new_name, RemoteRenameFailureHandler callback) + { + using (ThreadAffinity()) + { + using (RemoteSafeHandle remote = git_remote_load(repo, name, false)) + { + if (remote == null) + { + return; + } + + if (callback == null) + { + callback = problem => {}; + } + + var array = new GitStrArrayNative(); + + try + { + int res = NativeMethods.git_remote_rename( + ref array.Array, + remote, + new_name); + + Ensure.ZeroResult(res); + + foreach (var item in array.ReadStrings()) + { + callback(item); + } + } + finally + { + array.Dispose(); + } + } + } + } + public static void git_remote_save(RemoteSafeHandle remote) { using (ThreadAffinity()) @@ -1986,6 +2149,11 @@ public static string git_remote_url(RemoteSafeHandle remote) return NativeMethods.git_remote_url(remote); } + public static bool git_remote_supported_url(string url) + { + return NativeMethods.git_remote_supported_url(url); + } + #endregion #region git_repository_ @@ -2689,11 +2857,19 @@ public static IList git_tag_list(RepositorySafeHandle repo) { using (ThreadAffinity()) { - UnSafeNativeMethods.git_strarray arr; - int res = UnSafeNativeMethods.git_tag_list(out arr, repo); - Ensure.ZeroResult(res); + var array = new GitStrArrayNative(); - return Libgit2UnsafeHelper.BuildListOf(arr); + try + { + int res = NativeMethods.git_tag_list(out array.Array, repo); + Ensure.ZeroResult(res); + + return array.ReadStrings(); + } + finally + { + array.Dispose(); + } } } @@ -2709,7 +2885,17 @@ public static string git_tag_name(GitObjectSafeHandle tag) public static Signature git_tag_tagger(GitObjectSafeHandle tag) { - return new Signature(NativeMethods.git_tag_tagger(tag)); + IntPtr taggerHandle = NativeMethods.git_tag_tagger(tag); + + // Not all tags have a tagger signature - we need to handle + // this case. + Signature tagger = null; + if (taggerHandle != IntPtr.Zero) + { + tagger = new Signature(taggerHandle); + } + + return tagger; } public static ObjectId git_tag_target_id(GitObjectSafeHandle tag) @@ -2996,45 +3182,6 @@ Func resultSelector } } - private static unsafe class Libgit2UnsafeHelper - { - public static IList BuildListOf(UnSafeNativeMethods.git_strarray strArray) - { - - try - { - UnSafeNativeMethods.git_strarray* gitStrArray = &strArray; - - var numberOfEntries = (int)gitStrArray->size; - var list = new List(numberOfEntries); - for (uint i = 0; i < numberOfEntries; i++) - { - var name = LaxUtf8Marshaler.FromNative((IntPtr)gitStrArray->strings[i]); - list.Add(name); - } - - return list; - } - finally - { - UnSafeNativeMethods.git_strarray_free(ref strArray); - } - } - - public static IList RemoteLsHelper(IntPtr heads, UIntPtr size) - { - var rawHeads = (IntPtr*) heads; - var count = (int) size; - - var list = new List(count); - for (int i = 0; i < count; i++) - { - list.Add(rawHeads[i].MarshalAs()); - } - return list; - } - } - private static bool RepositoryStateChecker(RepositorySafeHandle repo, Func checker) { using (ThreadAffinity()) diff --git a/LibGit2Sharp/Core/UnSafeNativeMethods.cs b/LibGit2Sharp/Core/UnSafeNativeMethods.cs deleted file mode 100644 index be17f4397..000000000 --- a/LibGit2Sharp/Core/UnSafeNativeMethods.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using LibGit2Sharp.Core.Handles; - -namespace LibGit2Sharp.Core -{ - internal static unsafe class UnSafeNativeMethods - { - private const string libgit2 = NativeDllName.Name; - - [DllImport(libgit2)] - internal static extern int git_reference_list(out git_strarray array, RepositorySafeHandle repo); - - [DllImport(libgit2)] - internal static extern int git_remote_list(out git_strarray array, RepositorySafeHandle repo); - - [DllImport(libgit2)] - internal static extern int git_tag_list(out git_strarray array, RepositorySafeHandle repo); - - [DllImport(libgit2)] - internal static extern void git_strarray_free(ref git_strarray array); - - [DllImport(libgit2)] - internal static extern int git_remote_get_fetch_refspecs(out git_strarray array, RemoteSafeHandle remote); - - [DllImport(libgit2)] - internal static extern int git_remote_get_push_refspecs(out git_strarray array, RemoteSafeHandle remote); - - #region Nested type: git_strarray - - internal struct git_strarray - { - public sbyte** strings; - public UIntPtr size; - } - - #endregion - } -} diff --git a/LibGit2Sharp/Credentials.cs b/LibGit2Sharp/Credentials.cs index b5540705e..adf9582fe 100644 --- a/LibGit2Sharp/Credentials.cs +++ b/LibGit2Sharp/Credentials.cs @@ -1,5 +1,6 @@ using System; using LibGit2Sharp.Core; +using LibGit2Sharp.Handlers; namespace LibGit2Sharp { @@ -19,4 +20,41 @@ public abstract class Credentials /// 0 for success, < 0 to indicate an error, > 0 to indicate no credential was acquired. protected internal abstract int GitCredentialHandler(out IntPtr cred, IntPtr url, IntPtr usernameFromUrl, GitCredentialType types, IntPtr payload); } + + internal interface ICredentialsProvider + { + /// + /// The to authenticate with during the push. + /// + [Obsolete("This will be removed in future release. Use CredentialsProvider.")] + Credentials Credentials { get; } + + /// + /// Handler to generate for authentication. + /// + CredentialsHandler CredentialsProvider { get; } + } + + internal static class CredentialsProviderExtensions + { + public static CredentialsHandler GetCredentialsHandler(this ICredentialsProvider provider) + { + if (provider == null) + { + return null; + } + + if (provider.CredentialsProvider != null) + { + return provider.CredentialsProvider; + } + + if (provider.Credentials == null) + { + return null; + } + + return (url, user, type) => provider.Credentials; + } + } } diff --git a/LibGit2Sharp/Diff.cs b/LibGit2Sharp/Diff.cs index 6f0191e78..a1e87e3b3 100644 --- a/LibGit2Sharp/Diff.cs +++ b/LibGit2Sharp/Diff.cs @@ -60,12 +60,11 @@ private static GitDiffOptions BuildOptions(DiffModifiers diffOptions, FilePath[] options.NotifyCallback = matchedPathsAggregator.OnGitDiffNotify; } - if (filePaths == null) + if (filePaths != null) { - return options; + options.PathSpec = GitStrArrayManaged.BuildFrom(filePaths); } - options.PathSpec = GitStrArrayIn.BuildFrom(filePaths); return options; } diff --git a/LibGit2Sharp/EmptyCommitException.cs b/LibGit2Sharp/EmptyCommitException.cs index 39804a784..aa54a5f3c 100644 --- a/LibGit2Sharp/EmptyCommitException.cs +++ b/LibGit2Sharp/EmptyCommitException.cs @@ -39,7 +39,7 @@ public EmptyCommitException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected EmptyCommitException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/FetchOptions.cs b/LibGit2Sharp/FetchOptions.cs index 47f161e8b..2379cf70c 100644 --- a/LibGit2Sharp/FetchOptions.cs +++ b/LibGit2Sharp/FetchOptions.cs @@ -1,11 +1,12 @@ -using LibGit2Sharp.Handlers; +using System; +using LibGit2Sharp.Handlers; namespace LibGit2Sharp { /// /// Collection of parameters controlling Fetch behavior. /// - public sealed class FetchOptions + public sealed class FetchOptions : ICredentialsProvider { /// /// Specifies the tag-following behavior of the fetch operation. @@ -41,6 +42,12 @@ public sealed class FetchOptions /// /// Credentials to use for username/password authentication. /// + [Obsolete("This will be removed in future release. Use CredentialsProvider.")] public Credentials Credentials { get; set; } + + /// + /// Handler to generate for authentication. + /// + public CredentialsHandler CredentialsProvider { get; set; } } } diff --git a/LibGit2Sharp/FileStatus.cs b/LibGit2Sharp/FileStatus.cs index 08fa73f60..68e41b7b5 100644 --- a/LibGit2Sharp/FileStatus.cs +++ b/LibGit2Sharp/FileStatus.cs @@ -68,6 +68,11 @@ public enum FileStatus /// RenamedInWorkDir = (1 << 11), /* GIT_STATUS_WT_RENAMED */ + /// + /// The file is unreadable in the working directory. + /// + Unreadable = (1 << 12), /* GIT_STATUS_WT_UNREADABLE */ + /// /// The file is but its name and/or path matches an exclude pattern in a gitignore file. /// diff --git a/LibGit2Sharp/Handlers.cs b/LibGit2Sharp/Handlers.cs index 17e822ab6..ef688c550 100644 --- a/LibGit2Sharp/Handlers.cs +++ b/LibGit2Sharp/Handlers.cs @@ -22,6 +22,14 @@ /// True to continue, false to cancel. public delegate bool UpdateTipsHandler(string referenceName, ObjectId oldId, ObjectId newId); + /// + /// Delegate definition for the credentials retrieval callback + /// + /// The url + /// Username which was extracted from the url, if any + /// Credential types which the server accepts + public delegate Credentials CredentialsHandler(string url, string usernameFromUrl, SupportedCredentialTypes types); + /// /// Delegate definition for transfer progress callback. /// @@ -78,6 +86,16 @@ /// The unmatched path. public delegate void UnmatchedPathHandler(string unmatchedPath); + /// + /// Delegate definition for remote rename failure callback. + /// + /// This callback will be called to notify the caller of fetch refspecs + /// that haven't been automatically updated and need potential manual tweaking. + /// + /// + /// The refspec which didn't match the default. + public delegate void RemoteRenameFailureHandler(string problematicRefspec); + /// /// The stages of pack building. /// diff --git a/LibGit2Sharp/IRepository.cs b/LibGit2Sharp/IRepository.cs index d948a23d5..9dc915a68 100644 --- a/LibGit2Sharp/IRepository.cs +++ b/LibGit2Sharp/IRepository.cs @@ -215,7 +215,7 @@ public interface IRepository : IDisposable MergeResult Merge(Branch branch, Signature merger, MergeOptions options = null); /// - /// Merges changes from the commit into the branch pointed at by HEAD.. + /// Merges changes from the commit into the branch pointed at by HEAD. /// /// The commit to merge into branch pointed at by HEAD. /// The of who is performing the merge. @@ -223,6 +223,15 @@ public interface IRepository : IDisposable /// The of the merge. MergeResult Merge(string committish, Signature merger, MergeOptions options = null); + /// + /// Cherry picks changes from the commit into the branch pointed at by HEAD. + /// + /// The commit to cherry pick into branch pointed at by HEAD. + /// The of who is performing the cherry pick. + /// Specifies optional parameters controlling cherry pick behavior; if null, the defaults are used. + /// The of the merge. + CherryPickResult CherryPick(Commit commit, Signature committer, CherryPickOptions options = null); + /// /// Manipulate the currently ignored files. /// diff --git a/LibGit2Sharp/Index.cs b/LibGit2Sharp/Index.cs index 1f6501b4e..9548ceda4 100644 --- a/LibGit2Sharp/Index.cs +++ b/LibGit2Sharp/Index.cs @@ -129,32 +129,70 @@ IEnumerator IEnumerable.GetEnumerator() /// /// Promotes to the staging area the latest modifications of a file in the working directory (addition, updation or removal). + /// + /// If this path is ignored by configuration then it will not be staged. /// /// The path of the file within the working directory. /// /// If set, the passed will be treated as explicit paths. /// Use these options to determine how unmatched explicit paths should be handled. /// - public virtual void Stage(string path, ExplicitPathsOptions explicitPathsOptions = null) + [Obsolete("This will be removed in a future release. Supply ExplicitPathsOptions to StageOptions.")] + public virtual void Stage(string path, ExplicitPathsOptions explicitPathsOptions) + { + Stage(path, new StageOptions { ExplicitPathsOptions = explicitPathsOptions }); + } + + /// + /// Promotes to the staging area the latest modifications of a file in the working directory (addition, updation or removal). + /// + /// If this path is ignored by configuration then it will not be staged unless is unset. + /// + /// The path of the file within the working directory. + /// If set, determines how paths will be staged. + public virtual void Stage(string path, StageOptions stageOptions = null) { Ensure.ArgumentNotNull(path, "path"); - Stage(new[] { path }, explicitPathsOptions); + Stage(new[] { path }, stageOptions); } /// /// Promotes to the staging area the latest modifications of a collection of files in the working directory (addition, updation or removal). + /// + /// Any paths (even those listed explicitly) that are ignored by configuration will not be staged. /// /// The collection of paths of the files within the working directory. /// /// If set, the passed will be treated as explicit paths. /// Use these options to determine how unmatched explicit paths should be handled. /// - public virtual void Stage(IEnumerable paths, ExplicitPathsOptions explicitPathsOptions = null) + [Obsolete("This will be removed in a future release. Supply ExplicitPathsOptions to StageOptions.")] + public virtual void Stage(IEnumerable paths, ExplicitPathsOptions explicitPathsOptions) + { + Stage(paths, new StageOptions { ExplicitPathsOptions = explicitPathsOptions }); + } + + /// + /// Promotes to the staging area the latest modifications of a collection of files in the working directory (addition, updation or removal). + /// + /// Any paths (even those listed explicitly) that are ignored by configuration will not be staged unless is unset. + /// + /// The collection of paths of the files within the working directory. + /// If set, determines how paths will be staged. + public virtual void Stage(IEnumerable paths, StageOptions stageOptions = null) { Ensure.ArgumentNotNull(paths, "paths"); - var changes = repo.Diff.Compare(DiffModifiers.IncludeUntracked | DiffModifiers.IncludeIgnored, paths, explicitPathsOptions); + DiffModifiers diffModifiers = DiffModifiers.IncludeUntracked; + ExplicitPathsOptions explicitPathsOptions = stageOptions != null ? stageOptions.ExplicitPathsOptions : null; + + if (stageOptions != null && stageOptions.IncludeIgnored) + { + diffModifiers |= DiffModifiers.IncludeIgnored; + } + + var changes = repo.Diff.Compare(diffModifiers, paths, explicitPathsOptions); foreach (var treeEntryChanges in changes) { @@ -211,7 +249,7 @@ public virtual void Unstage(IEnumerable paths, ExplicitPathsOptions expl if (repo.Info.IsHeadUnborn) { - var changes = repo.Diff.Compare(null, DiffTargets.Index, paths, explicitPathsOptions); + var changes = repo.Diff.Compare(null, DiffTargets.Index, paths, explicitPathsOptions, new CompareOptions { Similarity = SimilarityOptions.None }); Reset(changes); } @@ -345,10 +383,44 @@ public virtual void Remove(string path, bool removeFromWorkingDirectory = true, /// public virtual void Remove(IEnumerable paths, bool removeFromWorkingDirectory = true, ExplicitPathsOptions explicitPathsOptions = null) { - var pathsList = paths.ToList(); - var changes = repo.Diff.Compare(DiffModifiers.IncludeUnmodified | DiffModifiers.IncludeUntracked, pathsList, explicitPathsOptions); + Ensure.ArgumentNotNullOrEmptyEnumerable(paths, "paths"); + + var pathsToDelete = paths.Where(p => Directory.Exists(Path.Combine(repo.Info.WorkingDirectory, p))).ToList(); + var notConflictedPaths = new List(); + + foreach (var path in paths) + { + Ensure.ArgumentNotNullOrEmptyString(path, "path"); + + var conflict = repo.Index.Conflicts[path]; - var pathsTodelete = pathsList.Where(p => Directory.Exists(Path.Combine(repo.Info.WorkingDirectory, p))).ToList(); + if (conflict != null) + { + pathsToDelete.Add(RemoveFromIndex(path)); + } + else + { + notConflictedPaths.Add(path); + } + } + + if (notConflictedPaths.Count > 0) + { + pathsToDelete.AddRange(RemoveStagedItems(notConflictedPaths, removeFromWorkingDirectory, explicitPathsOptions)); + } + + if (removeFromWorkingDirectory) + { + RemoveFilesAndFolders(pathsToDelete); + } + + UpdatePhysicalIndex(); + } + + private IEnumerable RemoveStagedItems(IEnumerable paths, bool removeFromWorkingDirectory = true, ExplicitPathsOptions explicitPathsOptions = null) + { + var removed = new List(); + var changes = repo.Diff.Compare(DiffModifiers.IncludeUnmodified | DiffModifiers.IncludeUntracked, paths, explicitPathsOptions); foreach (var treeEntryChanges in changes) { @@ -358,7 +430,7 @@ public virtual void Remove(IEnumerable paths, bool removeFromWorkingDire { case ChangeKind.Added: case ChangeKind.Deleted: - pathsTodelete.Add(RemoveFromIndex(treeEntryChanges.Path)); + removed.Add(RemoveFromIndex(treeEntryChanges.Path)); break; case ChangeKind.Unmodified: @@ -369,7 +441,7 @@ public virtual void Remove(IEnumerable paths, bool removeFromWorkingDire throw new RemoveFromIndexException(string.Format(CultureInfo.InvariantCulture, "Unable to remove file '{0}', as it has changes staged in the index. You can call the Remove() method with removeFromWorkingDirectory=false if you want to remove it from the index only.", treeEntryChanges.Path)); } - pathsTodelete.Add(RemoveFromIndex(treeEntryChanges.Path)); + removed.Add(RemoveFromIndex(treeEntryChanges.Path)); continue; case ChangeKind.Modified: @@ -383,22 +455,16 @@ public virtual void Remove(IEnumerable paths, bool removeFromWorkingDire throw new RemoveFromIndexException(string.Format(CultureInfo.InvariantCulture, "Unable to remove file '{0}', as it has local modifications. You can call the Remove() method with removeFromWorkingDirectory=false if you want to remove it from the index only.", treeEntryChanges.Path)); } - pathsTodelete.Add(RemoveFromIndex(treeEntryChanges.Path)); + removed.Add(RemoveFromIndex(treeEntryChanges.Path)); continue; - default: throw new RemoveFromIndexException(string.Format(CultureInfo.InvariantCulture, "Unable to remove file '{0}'. Its current status is '{1}'.", treeEntryChanges.Path, treeEntryChanges.Status)); } } - if (removeFromWorkingDirectory) - { - RemoveFilesAndFolders(pathsTodelete); - } - - UpdatePhysicalIndex(); + return removed; } private void RemoveFilesAndFolders(IEnumerable pathsList) diff --git a/LibGit2Sharp/IndexNameEntry.cs b/LibGit2Sharp/IndexNameEntry.cs new file mode 100644 index 000000000..ef6fc50d2 --- /dev/null +++ b/LibGit2Sharp/IndexNameEntry.cs @@ -0,0 +1,124 @@ +using System; +using System.Diagnostics; +using System.Globalization; +using LibGit2Sharp.Core; +using LibGit2Sharp.Core.Handles; + +namespace LibGit2Sharp +{ + /// + /// A reference to the paths involved in a rename , + /// known by the . + /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] + public class IndexNameEntry : IEquatable + { + private static readonly LambdaEqualityHelper equalityHelper = + new LambdaEqualityHelper(x => x.Ancestor, x => x.Ours, x => x.Theirs); + + /// + /// Needed for mocking purposes. + /// + protected IndexNameEntry() + { } + + internal static IndexNameEntry BuildFromPtr(IndexNameEntrySafeHandle handle) + { + if (handle == null || handle.IsZero) + { + return null; + } + + GitIndexNameEntry entry = handle.MarshalAsGitIndexNameEntry(); + + string ancestor = entry.Ancestor != IntPtr.Zero ? + LaxFilePathMarshaler.FromNative(entry.Ancestor).Native : null; + string ours = entry.Ours != IntPtr.Zero ? + LaxFilePathMarshaler.FromNative(entry.Ours).Native : null; + string theirs = entry.Theirs != IntPtr.Zero ? + LaxFilePathMarshaler.FromNative(entry.Theirs).Native : null; + + return new IndexNameEntry + { + Ancestor = ancestor, + Ours = ours, + Theirs = theirs, + }; + } + + /// + /// Gets the path of the ancestor side of the conflict. + /// + public virtual string Ancestor { get; private set; } + + /// + /// Gets the path of the "ours" side of the conflict. + /// + public virtual string Ours { get; private set; } + + /// + /// Gets the path of the "theirs" side of the conflict. + /// + public virtual string Theirs { get; private set; } + + /// + /// Determines whether the specified is equal to the current . + /// + /// The to compare with the current . + /// True if the specified is equal to the current ; otherwise, false. + public override bool Equals(object obj) + { + return Equals(obj as IndexNameEntry); + } + + /// + /// Determines whether the specified is equal to the current . + /// + /// The to compare with the current . + /// True if the specified is equal to the current ; otherwise, false. + public bool Equals(IndexNameEntry other) + { + return equalityHelper.Equals(this, other); + } + + /// + /// Returns the hash code for this instance. + /// + /// A 32-bit signed integer hash code. + public override int GetHashCode() + { + return equalityHelper.GetHashCode(this); + } + + /// + /// Tests if two are equal. + /// + /// First to compare. + /// Second to compare. + /// True if the two objects are equal; false otherwise. + public static bool operator ==(IndexNameEntry left, IndexNameEntry right) + { + return Equals(left, right); + } + + /// + /// Tests if two are different. + /// + /// First to compare. + /// Second to compare. + /// True if the two objects are different; false otherwise. + public static bool operator !=(IndexNameEntry left, IndexNameEntry right) + { + return !Equals(left, right); + } + + private string DebuggerDisplay + { + get + { + return string.Format(CultureInfo.InvariantCulture, + "{0} {1} {2}", Ancestor, Ours, Theirs); + } + } + } +} diff --git a/LibGit2Sharp/IndexNameEntryCollection.cs b/LibGit2Sharp/IndexNameEntryCollection.cs new file mode 100644 index 000000000..30dff911b --- /dev/null +++ b/LibGit2Sharp/IndexNameEntryCollection.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using LibGit2Sharp.Core; +using LibGit2Sharp.Core.Handles; + +namespace LibGit2Sharp +{ + /// + /// The collection of s in a + /// index that reflect the + /// original paths of any rename conflicts that exist in the index. + /// + public class IndexNameEntryCollection : IEnumerable + { + private readonly Repository repo; + + /// + /// Needed for mocking purposes. + /// + protected IndexNameEntryCollection() + { } + + internal IndexNameEntryCollection(Repository repo) + { + this.repo = repo; + } + + private IndexNameEntry this[int index] + { + get + { + IndexNameEntrySafeHandle entryHandle = Proxy.git_index_name_get_byindex(repo.Index.Handle, (UIntPtr)index); + return IndexNameEntry.BuildFromPtr(entryHandle); + } + } + + #region IEnumerable Members + + private List AllIndexNames() + { + var list = new List(); + + int count = Proxy.git_index_name_entrycount(repo.Index.Handle); + + for (int i = 0; i < count; i++) + { + list.Add(this[i]); + } + + return list; + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// An object that can be used to iterate through the collection. + public virtual IEnumerator GetEnumerator() + { + return AllIndexNames().GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// An object that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + #endregion + } +} diff --git a/LibGit2Sharp/IndexReucEntry.cs b/LibGit2Sharp/IndexReucEntry.cs new file mode 100644 index 000000000..ffba71e07 --- /dev/null +++ b/LibGit2Sharp/IndexReucEntry.cs @@ -0,0 +1,152 @@ +using System; +using System.Diagnostics; +using System.Globalization; +using LibGit2Sharp.Core; +using LibGit2Sharp.Core.Handles; + +namespace LibGit2Sharp +{ + /// + /// A reference to a resolved , + /// known by the . + /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] + public class IndexReucEntry : IEquatable + { + private static readonly LambdaEqualityHelper equalityHelper = + new LambdaEqualityHelper(x => x.Path, + x => x.AncestorId, x => x.AncestorMode, + x => x.OurId, x => x.OurMode, + x => x.TheirId, x => x.TheirMode); + + /// + /// Needed for mocking purposes. + /// + protected IndexReucEntry() + { } + + internal static IndexReucEntry BuildFromPtr(IndexReucEntrySafeHandle handle) + { + if (handle == null || handle.IsZero) + { + return null; + } + + GitIndexReucEntry entry = handle.MarshalAsGitIndexReucEntry(); + + FilePath path = LaxFilePathMarshaler.FromNative(entry.Path); + + return new IndexReucEntry + { + Path = path.Native, + AncestorId = entry.AncestorId, + AncestorMode = (Mode)entry.AncestorMode, + OurId = entry.OurId, + OurMode = (Mode)entry.OurMode, + TheirId = entry.TheirId, + TheirMode = (Mode)entry.TheirMode, + }; + } + + /// + /// Gets the path of this conflict. + /// + public virtual string Path { get; private set; } + + /// + /// Gets the that was the ancestor of this + /// conflict. + /// + public virtual ObjectId AncestorId { get; private set; } + + /// + /// Gets the of the file that was the ancestor of + /// conflict. + /// + public virtual Mode AncestorMode { get; private set; } + + /// + /// Gets the that was "our" side of this + /// conflict. + /// + public virtual ObjectId OurId { get; private set; } + + /// + /// Gets the of the file that was "our" side of + /// the conflict. + /// + public virtual Mode OurMode { get; private set; } + + /// + /// Gets the that was "their" side of this + /// conflict. + /// + public virtual ObjectId TheirId { get; private set; } + + /// + /// Gets the of the file that was "their" side of + /// the conflict. + /// + public virtual Mode TheirMode { get; private set; } + + /// + /// Determines whether the specified is equal to the current . + /// + /// The to compare with the current . + /// True if the specified is equal to the current ; otherwise, false. + public override bool Equals(object obj) + { + return Equals(obj as IndexReucEntry); + } + + /// + /// Determines whether the specified is equal to the current . + /// + /// The to compare with the current . + /// True if the specified is equal to the current ; otherwise, false. + public bool Equals(IndexReucEntry other) + { + return equalityHelper.Equals(this, other); + } + + /// + /// Returns the hash code for this instance. + /// + /// A 32-bit signed integer hash code. + public override int GetHashCode() + { + return equalityHelper.GetHashCode(this); + } + + /// + /// Tests if two are equal. + /// + /// First to compare. + /// Second to compare. + /// True if the two objects are equal; false otherwise. + public static bool operator ==(IndexReucEntry left, IndexReucEntry right) + { + return Equals(left, right); + } + + /// + /// Tests if two are different. + /// + /// First to compare. + /// Second to compare. + /// True if the two objects are different; false otherwise. + public static bool operator !=(IndexReucEntry left, IndexReucEntry right) + { + return !Equals(left, right); + } + + private string DebuggerDisplay + { + get + { + return string.Format(CultureInfo.InvariantCulture, + "{0}: {1} {2} {3}", Path, AncestorId, OurId, TheirId); + } + } + } +} diff --git a/LibGit2Sharp/IndexReucEntryCollection.cs b/LibGit2Sharp/IndexReucEntryCollection.cs new file mode 100644 index 000000000..7a81e3b41 --- /dev/null +++ b/LibGit2Sharp/IndexReucEntryCollection.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using LibGit2Sharp.Core; +using LibGit2Sharp.Core.Handles; + +namespace LibGit2Sharp +{ + /// + /// The collection of s in a + /// index that reflect the + /// resolved conflicts. + /// + public class IndexReucEntryCollection : IEnumerable + { + private readonly Repository repo; + + /// + /// Needed for mocking purposes. + /// + protected IndexReucEntryCollection() + { } + + internal IndexReucEntryCollection(Repository repo) + { + this.repo = repo; + } + + /// + /// Gets the with the specified relative path. + /// + public virtual IndexReucEntry this[string path] + { + get + { + Ensure.ArgumentNotNullOrEmptyString(path, "path"); + + IndexReucEntrySafeHandle entryHandle = Proxy.git_index_reuc_get_bypath(repo.Index.Handle, path); + return IndexReucEntry.BuildFromPtr(entryHandle); + } + } + + private IndexReucEntry this[int index] + { + get + { + IndexReucEntrySafeHandle entryHandle = Proxy.git_index_reuc_get_byindex(repo.Index.Handle, (UIntPtr)index); + return IndexReucEntry.BuildFromPtr(entryHandle); + } + } + + #region IEnumerable Members + + private List AllIndexReucs() + { + var list = new List(); + + int count = Proxy.git_index_reuc_entrycount(repo.Index.Handle); + + for (int i = 0; i < count; i++) + { + list.Add(this[i]); + } + + return list; + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// An object that can be used to iterate through the collection. + public virtual IEnumerator GetEnumerator() + { + return AllIndexReucs().GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// An object that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + #endregion + } +} diff --git a/LibGit2Sharp/InvalidSpecificationException.cs b/LibGit2Sharp/InvalidSpecificationException.cs index fdeb9a236..5113f8c63 100644 --- a/LibGit2Sharp/InvalidSpecificationException.cs +++ b/LibGit2Sharp/InvalidSpecificationException.cs @@ -39,7 +39,7 @@ public InvalidSpecificationException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected InvalidSpecificationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/LibGit2Sharp.csproj b/LibGit2Sharp/LibGit2Sharp.csproj index 8d2f44ca6..d8814ab95 100644 --- a/LibGit2Sharp/LibGit2Sharp.csproj +++ b/LibGit2Sharp/LibGit2Sharp.csproj @@ -73,15 +73,23 @@ + + + + + + + + @@ -90,8 +98,12 @@ + + + + @@ -120,13 +132,16 @@ + - + + + @@ -265,7 +280,6 @@ Code - @@ -313,6 +327,7 @@ + diff --git a/LibGit2Sharp/LibGit2SharpException.cs b/LibGit2Sharp/LibGit2SharpException.cs index 609b815d7..f5af473fd 100644 --- a/LibGit2Sharp/LibGit2SharpException.cs +++ b/LibGit2Sharp/LibGit2SharpException.cs @@ -40,7 +40,7 @@ public LibGit2SharpException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected LibGit2SharpException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/LockedFileException.cs b/LibGit2Sharp/LockedFileException.cs index ab1da6e74..a086a7b0b 100644 --- a/LibGit2Sharp/LockedFileException.cs +++ b/LibGit2Sharp/LockedFileException.cs @@ -39,7 +39,7 @@ public LockedFileException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected LockedFileException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/MergeConflictException.cs b/LibGit2Sharp/MergeConflictException.cs index 802b8df58..69ce3d6b6 100644 --- a/LibGit2Sharp/MergeConflictException.cs +++ b/LibGit2Sharp/MergeConflictException.cs @@ -40,7 +40,7 @@ public MergeConflictException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected MergeConflictException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/MergeOptions.cs b/LibGit2Sharp/MergeOptions.cs index be25665ee..b88cd0ca3 100644 --- a/LibGit2Sharp/MergeOptions.cs +++ b/LibGit2Sharp/MergeOptions.cs @@ -12,7 +12,7 @@ public sealed class MergeOptions : IConvertableToGitCheckoutOpts /// Initializes a new instance of the class. /// /// Default behavior: - /// A fast-forward merge will be performed if possible. + /// A fast-forward merge will be performed if possible, unless the merge.ff configuration option is set. /// A merge commit will be committed, if one was created. /// Merge will attempt to find renames. /// @@ -95,8 +95,7 @@ CheckoutStrategy IConvertableToGitCheckoutOpts.CheckoutStrategy { get { - return CheckoutStrategy.GIT_CHECKOUT_SAFE| - CheckoutStrategy.GIT_CHECKOUT_ALLOW_CONFLICTS | + return CheckoutStrategy.GIT_CHECKOUT_SAFE | GitCheckoutOptsWrapper.CheckoutStrategyFromFileConflictStrategy(FileConflictStrategy); } } @@ -110,9 +109,9 @@ CheckoutStrategy IConvertableToGitCheckoutOpts.CheckoutStrategy public enum FastForwardStrategy { /// - /// Default fast-forward strategy. This will perform a fast-forward merge - /// if possible, otherwise will perform a non-fast-forward merge that - /// results in a merge commit. + /// Default fast-forward strategy. If the merge.ff configuration option is set, + /// it will be used. If it is not set, this will perform a fast-forward merge if + /// possible, otherwise a non-fast-forward merge that results in a merge commit. /// Default = 0, diff --git a/LibGit2Sharp/Mode.cs b/LibGit2Sharp/Mode.cs index b15a2a97b..b2ade9dde 100644 --- a/LibGit2Sharp/Mode.cs +++ b/LibGit2Sharp/Mode.cs @@ -8,7 +8,7 @@ public enum Mode // Inspired from http://stackoverflow.com/a/8347325/335418 /// - /// 000000 file mode (the entry doesn't exist) + /// 000000 file mode (the entry doesn't exist or is unreadable) /// Nonexistent = 0, diff --git a/LibGit2Sharp/NameConflictException.cs b/LibGit2Sharp/NameConflictException.cs index 75ec7807e..16d1bf091 100644 --- a/LibGit2Sharp/NameConflictException.cs +++ b/LibGit2Sharp/NameConflictException.cs @@ -39,7 +39,7 @@ public NameConflictException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected NameConflictException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/Network.cs b/LibGit2Sharp/Network.cs index e0621f884..da4cd4b0d 100644 --- a/LibGit2Sharp/Network.cs +++ b/LibGit2Sharp/Network.cs @@ -48,15 +48,34 @@ public virtual RemoteCollection Remotes /// The to list from. /// The optional used to connect to remote repository. /// The references in the repository. - public virtual IEnumerable ListReferences(Remote remote, Credentials credentials = null) + [Obsolete("This will be removed in future release. Use the overload ListReferences(Remote, CredentialsHandler).")] + public virtual IEnumerable ListReferences(Remote remote, Credentials credentials) + { + return ListReferences(remote, + credentials == null ? null : new CredentialsHandler((url, user, type) => credentials)); + } + + /// + /// List references in a repository. + /// + /// When the remote tips are ahead of the local ones, the retrieved + /// s may point to non existing + /// s in the local repository. In that + /// case, will return null. + /// + /// + /// The to list from. + /// The optional used to connect to remote repository. + /// The references in the repository. + public virtual IEnumerable ListReferences(Remote remote, CredentialsHandler credentialsProvider = null) { Ensure.ArgumentNotNull(remote, "remote"); using (RemoteSafeHandle remoteHandle = Proxy.git_remote_load(repository.Handle, remote.Name, true)) { - if (credentials != null) + if (credentialsProvider != null) { - var callbacks = new RemoteCallbacks(null, null, null, credentials); + var callbacks = new RemoteCallbacks(null, null, null, credentialsProvider); GitRemoteCallbacks gitCallbacks = callbacks.GenerateCallbacks(); Proxy.git_remote_set_callbacks(remoteHandle, ref gitCallbacks); } @@ -272,7 +291,7 @@ public virtual void Push( // Load the remote. using (RemoteSafeHandle remoteHandle = Proxy.git_remote_load(repository.Handle, remote.Name, true)) { - var callbacks = new RemoteCallbacks(null, null, null, pushOptions.Credentials); + var callbacks = new RemoteCallbacks(null, null, null, pushOptions); GitRemoteCallbacks gitCallbacks = callbacks.GenerateCallbacks(); Proxy.git_remote_set_callbacks(remoteHandle, ref gitCallbacks); diff --git a/LibGit2Sharp/NonFastForwardException.cs b/LibGit2Sharp/NonFastForwardException.cs index d12576c05..2cf4ccd93 100644 --- a/LibGit2Sharp/NonFastForwardException.cs +++ b/LibGit2Sharp/NonFastForwardException.cs @@ -40,7 +40,7 @@ public NonFastForwardException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected NonFastForwardException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/ObjectDatabase.cs b/LibGit2Sharp/ObjectDatabase.cs index 3d36b9c26..d7752b41b 100644 --- a/LibGit2Sharp/ObjectDatabase.cs +++ b/LibGit2Sharp/ObjectDatabase.cs @@ -99,6 +99,10 @@ public virtual Blob CreateBlob(string path) /// /// Adds the provided backend to the object database with the specified priority. + /// + /// If the provided backend implements , the + /// method will be honored and invoked upon the disposal of the repository. + /// /// /// The backend to add /// The priority at which libgit2 should consult this backend (higher values are consulted first) @@ -368,5 +372,30 @@ public virtual HistoryDivergence CalculateHistoryDivergence(Commit one, Commit a return new HistoryDivergence(repo, one, another); } + + /// + /// Calculates the current shortest abbreviated + /// string representation for a . + /// + /// The which identifier should be shortened. + /// Minimum length of the shortened representation. + /// A short string representation of the . + public virtual string ShortenObjectId(GitObject gitObject, int? minLength = null) + { + if (minLength.HasValue && (minLength <= 0 || minLength > ObjectId.HexSize)) + { + throw new ArgumentOutOfRangeException("minLength", minLength, + string.Format("Expected value should be greater than zero and less than or equal to {0}.", ObjectId.HexSize)); + } + + string shortSha = Proxy.git_object_short_id(repo.Handle, gitObject.Id); + + if (minLength == null || (minLength <= shortSha.Length)) + { + return shortSha; + } + + return gitObject.Sha.Substring(0, minLength.Value); + } } } diff --git a/LibGit2Sharp/ObjectId.cs b/LibGit2Sharp/ObjectId.cs index 0d7b845dd..7b247e8a1 100644 --- a/LibGit2Sharp/ObjectId.cs +++ b/LibGit2Sharp/ObjectId.cs @@ -11,13 +11,13 @@ namespace LibGit2Sharp public sealed class ObjectId : IEquatable { private readonly GitOid oid; - private const int rawSize = 20; + private const int rawSize = GitOid.Size; private readonly string sha; /// /// Size of the string-based representation of a SHA-1. /// - private const int HexSize = rawSize * 2; + internal const int HexSize = rawSize * 2; private const string hexDigits = "0123456789abcdef"; private static readonly byte[] reverseHexDigits = BuildReverseHexDigits(); diff --git a/LibGit2Sharp/OdbBackend.cs b/LibGit2Sharp/OdbBackend.cs index 549942537..149b996ce 100644 --- a/LibGit2Sharp/OdbBackend.cs +++ b/LibGit2Sharp/OdbBackend.cs @@ -8,20 +8,26 @@ namespace LibGit2Sharp { /// /// Base class for all custom managed backends for the libgit2 object database (ODB). + /// + /// If the derived backend implements , the + /// method will be honored and invoked upon the disposal of the repository. + /// /// public abstract class OdbBackend { /// /// Invoked by libgit2 when this backend is no longer needed. /// - protected virtual void Dispose() + internal void Free() { - if (IntPtr.Zero != nativeBackendPointer) + if (nativeBackendPointer == IntPtr.Zero) { - GCHandle.FromIntPtr(Marshal.ReadIntPtr(nativeBackendPointer, GitOdbBackend.GCHandleOffset)).Free(); - Marshal.FreeHGlobal(nativeBackendPointer); - nativeBackendPointer = IntPtr.Zero; + return; } + + GCHandle.FromIntPtr(Marshal.ReadIntPtr(nativeBackendPointer, GitOdbBackend.GCHandleOffset)).Free(); + Marshal.FreeHGlobal(nativeBackendPointer); + nativeBackendPointer = IntPtr.Zero; } /// @@ -36,19 +42,37 @@ protected abstract OdbBackendOperations SupportedOperations /// Call this method from your implementations of Read and ReadPrefix to allocate a buffer in /// which to return the object's data. /// - /// Number of bytes to allocate - /// An Stream for you to write to and then return. Do not dispose this object before returning it. - protected unsafe Stream Allocate(long bytes) + /// The bytes to be copied to the stream. + /// + /// A Stream already filled with the content of provided the byte array. + /// Do not dispose this object before returning it. + /// + protected UnmanagedMemoryStream AllocateAndBuildFrom(byte[] bytes) { - if (bytes < 0 || - (UIntPtr.Size == sizeof(int) && bytes > int.MaxValue)) + var stream = Allocate(bytes.Length); + + stream.Write(bytes, 0, bytes.Length); + + return stream; + } + + /// + /// Call this method from your implementations of Read and ReadPrefix to allocate a buffer in + /// which to return the object's data. + /// + /// Number of bytes to allocate + /// A Stream for you to write to and then return. Do not dispose this object before returning it. + protected unsafe UnmanagedMemoryStream Allocate(long size) + { + if (size < 0 || + (UIntPtr.Size == sizeof(int) && size > int.MaxValue)) { - throw new ArgumentOutOfRangeException("bytes"); + throw new ArgumentOutOfRangeException("size"); } - IntPtr buffer = Proxy.git_odb_backend_malloc(this.GitOdbBackendPointer, new UIntPtr((ulong)bytes)); + IntPtr buffer = Proxy.git_odb_backend_malloc(this.GitOdbBackendPointer, new UIntPtr((ulong)size)); - return new UnmanagedMemoryStream((byte*)buffer, 0, bytes, FileAccess.ReadWrite); + return new UnmanagedMemoryStream((byte*)buffer, 0, size, FileAccess.ReadWrite); } /// @@ -56,7 +80,7 @@ protected unsafe Stream Allocate(long bytes) /// public abstract int Read( ObjectId id, - out Stream data, + out UnmanagedMemoryStream data, out ObjectType objectType); /// @@ -65,7 +89,7 @@ public abstract int Read( public abstract int ReadPrefix( string shortSha, out ObjectId oid, - out Stream data, + out UnmanagedMemoryStream data, out ObjectType objectType); /// @@ -106,6 +130,11 @@ public abstract int WriteStream( /// public abstract bool Exists(ObjectId id); + /// + /// Requests that this backend check if an object ID exists. The object ID may not be complete (may be a prefix). + /// + public abstract int ExistsPrefix(string shortSha, out ObjectId found); + /// /// Requests that this backend enumerate all items in the backing store. /// @@ -169,6 +198,11 @@ internal IntPtr GitOdbBackendPointer nativeBackend.Exists = BackendEntryPoints.ExistsCallback; } + if ((supportedOperations & OdbBackendOperations.ExistsPrefix) != 0) + { + nativeBackend.ExistsPrefix = BackendEntryPoints.ExistsPrefixCallback; + } + if ((supportedOperations & OdbBackendOperations.ForEach) != 0) { nativeBackend.Foreach = BackendEntryPoints.ForEachCallback; @@ -196,6 +230,7 @@ private static class BackendEntryPoints public static readonly GitOdbBackend.write_callback WriteCallback = Write; public static readonly GitOdbBackend.writestream_callback WriteStreamCallback = WriteStream; public static readonly GitOdbBackend.exists_callback ExistsCallback = Exists; + public static readonly GitOdbBackend.exists_prefix_callback ExistsPrefixCallback = ExistsPrefix; public static readonly GitOdbBackend.foreach_callback ForEachCallback = Foreach; public static readonly GitOdbBackend.free_callback FreeCallback = Free; @@ -231,21 +266,18 @@ private unsafe static int Read( return (int)GitErrorCode.Error; } - Stream dataStream = null; + UnmanagedMemoryStream memoryStream = null; try { ObjectType objectType; - int toReturn = odbBackend.Read(new ObjectId(oid), out dataStream, out objectType); + int toReturn = odbBackend.Read(new ObjectId(oid), out memoryStream, out objectType); if (toReturn != 0) { return toReturn; } - // Caller is expected to give us back a stream created with the Allocate() method. - var memoryStream = dataStream as UnmanagedMemoryStream; - if (memoryStream == null) { return (int)GitErrorCode.Error; @@ -265,9 +297,9 @@ private unsafe static int Read( } finally { - if (dataStream != null) + if (memoryStream != null) { - dataStream.Dispose(); + memoryStream.Dispose(); } } @@ -294,7 +326,7 @@ private unsafe static int ReadPrefix( return (int)GitErrorCode.Error; } - Stream dataStream = null; + UnmanagedMemoryStream memoryStream = null; try { @@ -303,16 +335,13 @@ private unsafe static int ReadPrefix( ObjectId oid; ObjectType objectType; - int toReturn = odbBackend.ReadPrefix(shortSha, out oid, out dataStream, out objectType); + int toReturn = odbBackend.ReadPrefix(shortSha, out oid, out memoryStream, out objectType); if (toReturn != 0) { return toReturn; } - // Caller is expected to give us back a stream created with the Allocate() method. - var memoryStream = dataStream as UnmanagedMemoryStream; - if (memoryStream == null) { return (int)GitErrorCode.Error; @@ -332,9 +361,9 @@ private unsafe static int ReadPrefix( } finally { - if (null != dataStream) + if (memoryStream != null) { - dataStream.Dispose(); + memoryStream.Dispose(); } } @@ -498,6 +527,40 @@ private static bool Exists( } } + private static int ExistsPrefix( + ref GitOid found_oid, + IntPtr backend, + ref GitOid short_oid, + UIntPtr len) + { + OdbBackend odbBackend = MarshalOdbBackend(backend); + if (odbBackend == null) + { + return (int)GitErrorCode.Error; + } + + try + { + ObjectId found; + var shortSha = ObjectId.ToString(short_oid.Id, (int)len); + + found_oid.Id = ObjectId.Zero.RawId; + int result = odbBackend.ExistsPrefix(shortSha, out found); + + if (result == (int) GitErrorCode.Ok) + { + found_oid.Id = found.RawId; + } + + return result; + } + catch (Exception ex) + { + Proxy.giterr_set_str(GitErrorCategory.Odb, ex); + return (int)GitErrorCode.Error; + } + } + private static int Foreach( IntPtr backend, GitOdbBackend.foreach_callback_callback cb, @@ -531,7 +594,16 @@ private static void Free( try { - odbBackend.Dispose(); + odbBackend.Free(); + + var disposable = odbBackend as IDisposable; + + if (disposable == null) + { + return; + } + + disposable.Dispose(); } catch (Exception ex) { @@ -620,10 +692,15 @@ protected enum OdbBackendOperations /// Exists = 64, + /// + /// This OdbBackend declares that it supports the ExistsPrefix method. + /// + ExistsPrefix = 128, + /// /// This OdbBackend declares that it supports the Foreach method. /// - ForEach = 128, + ForEach = 256, } /// diff --git a/LibGit2Sharp/Patch.cs b/LibGit2Sharp/Patch.cs index c08807a6c..4bbb884bd 100644 --- a/LibGit2Sharp/Patch.cs +++ b/LibGit2Sharp/Patch.cs @@ -16,11 +16,11 @@ namespace LibGit2Sharp /// deleted, modified, ..., then consider using a simpler . /// [DebuggerDisplay("{DebuggerDisplay,nq}")] - public class Patch : IEnumerable + public class Patch : IEnumerable { private readonly StringBuilder fullPatchBuilder = new StringBuilder(); - private readonly IDictionary changes = new Dictionary(); + private readonly IDictionary changes = new Dictionary(); private int linesAdded; private int linesDeleted; @@ -47,9 +47,9 @@ internal Patch(DiffSafeHandle diff) private void AddFileChange(GitDiffDelta delta) { - var pathPtr = delta.NewFile.Path != IntPtr.Zero ? delta.NewFile.Path : delta.OldFile.Path; - var newFilePath = LaxFilePathMarshaler.FromNative(pathPtr); - changes.Add(newFilePath, new ContentChanges(delta.IsBinary())); + var treeEntryChanges = new TreeEntryChanges(delta); + + changes.Add(treeEntryChanges.Path, new PatchEntryChanges(delta.IsBinary(), treeEntryChanges)); } private int PrintCallBack(GitDiffDelta delta, GitDiffHunk hunk, GitDiffLine line, IntPtr payload) @@ -61,7 +61,7 @@ private int PrintCallBack(GitDiffDelta delta, GitDiffHunk hunk, GitDiffLine line var pathPtr = delta.NewFile.Path != IntPtr.Zero ? delta.NewFile.Path : delta.OldFile.Path; var filePath = LaxFilePathMarshaler.FromNative(pathPtr); - ContentChanges currentChange = this[filePath]; + PatchEntryChanges currentChange = this[filePath]; string prefix = string.Empty; switch (line.lineOrigin) @@ -91,13 +91,13 @@ private int PrintCallBack(GitDiffDelta delta, GitDiffHunk hunk, GitDiffLine line return 0; } - #region IEnumerable Members + #region IEnumerable Members /// /// Returns an enumerator that iterates through the collection. /// /// An object that can be used to iterate through the collection. - public virtual IEnumerator GetEnumerator() + public virtual IEnumerator GetEnumerator() { return changes.Values.GetEnumerator(); } @@ -116,19 +116,19 @@ IEnumerator IEnumerable.GetEnumerator() /// /// Gets the corresponding to the specified . /// - public virtual ContentChanges this[string path] + public virtual PatchEntryChanges this[string path] { get { return this[(FilePath)path]; } } - private ContentChanges this[FilePath path] + private PatchEntryChanges this[FilePath path] { get { - ContentChanges contentChanges; - if (changes.TryGetValue(path, out contentChanges)) + PatchEntryChanges entryChanges; + if (changes.TryGetValue(path, out entryChanges)) { - return contentChanges; + return entryChanges; } return null; diff --git a/LibGit2Sharp/PatchEntryChanges.cs b/LibGit2Sharp/PatchEntryChanges.cs new file mode 100644 index 000000000..0a7d925b7 --- /dev/null +++ b/LibGit2Sharp/PatchEntryChanges.cs @@ -0,0 +1,78 @@ +namespace LibGit2Sharp +{ + /// + /// Holds the changes between two versions of a file. + /// + public class PatchEntryChanges : ContentChanges + { + private readonly TreeEntryChanges treeEntryChanges; + + /// + /// Needed for mocking purposes. + /// + protected PatchEntryChanges() + { } + + internal PatchEntryChanges(bool isBinaryComparison, TreeEntryChanges treeEntryChanges) + : base(isBinaryComparison) + { + this.treeEntryChanges = treeEntryChanges; + } + + /// + /// The new path. + /// + public virtual string Path + { + get { return treeEntryChanges.Path; } + } + + /// + /// The new . + /// + public virtual Mode Mode + { + get { return treeEntryChanges.Mode; } + } + + /// + /// The new content hash. + /// + public virtual ObjectId Oid + { + get { return treeEntryChanges.Oid; } + } + + /// + /// The kind of change that has been done (added, deleted, modified ...). + /// + public virtual ChangeKind Status + { + get { return treeEntryChanges.Status; } + } + + /// + /// The old path. + /// + public virtual string OldPath + { + get { return treeEntryChanges.OldPath; } + } + + /// + /// The old . + /// + public virtual Mode OldMode + { + get { return treeEntryChanges.OldMode; } + } + + /// + /// The old content hash. + /// + public virtual ObjectId OldOid + { + get { return treeEntryChanges.OldOid; } + } + } +} diff --git a/LibGit2Sharp/Properties/AssemblyInfo.cs b/LibGit2Sharp/Properties/AssemblyInfo.cs index 58286cd15..4e510cf50 100644 --- a/LibGit2Sharp/Properties/AssemblyInfo.cs +++ b/LibGit2Sharp/Properties/AssemblyInfo.cs @@ -42,5 +42,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.18.1")] -[assembly: AssemblyFileVersion("0.18.1")] +[assembly: AssemblyVersion("0.19.0")] +[assembly: AssemblyFileVersion("0.19.0")] diff --git a/LibGit2Sharp/PushOptions.cs b/LibGit2Sharp/PushOptions.cs index db998ff29..d8fa90b2d 100644 --- a/LibGit2Sharp/PushOptions.cs +++ b/LibGit2Sharp/PushOptions.cs @@ -1,17 +1,24 @@ -using LibGit2Sharp.Handlers; +using System; +using LibGit2Sharp.Handlers; namespace LibGit2Sharp { /// /// Collection of parameters controlling Push behavior. /// - public sealed class PushOptions + public sealed class PushOptions : ICredentialsProvider { /// - /// The to authenticate with during the push. + /// The to authenticate with during the push. /// + [Obsolete("This will be removed in future release. Use CredentialsProvider.")] public Credentials Credentials { get; set; } + /// + /// Handler to generate for authentication. + /// + public CredentialsHandler CredentialsProvider { get; set; } + /// /// If the transport being used to push to the remote requires the creation /// of a pack file, this controls the number of worker threads used by diff --git a/LibGit2Sharp/Remote.cs b/LibGit2Sharp/Remote.cs index d86e44ebc..e999d08d4 100644 --- a/LibGit2Sharp/Remote.cs +++ b/LibGit2Sharp/Remote.cs @@ -99,12 +99,22 @@ internal string FetchSpecTransformToSource(string reference) /// Determines if the proposed remote name is well-formed. /// /// The name to be checked. - /// true is the name is valid; false otherwise. + /// true if the name is valid; false otherwise. public static bool IsValidName(string name) { return Proxy.git_remote_is_valid_name(name); } + /// + /// Determines if the proposed remote URL is supported by the library. + /// + /// The URL to be checked. + /// true if the url is supported; false otherwise. + public static bool IsSupportedUrl(string url) + { + return Proxy.git_remote_supported_url(url); + } + /// /// Determines whether the specified is equal to the current . /// diff --git a/LibGit2Sharp/RemoteCallbacks.cs b/LibGit2Sharp/RemoteCallbacks.cs index 25e0d6564..8adb17b4c 100644 --- a/LibGit2Sharp/RemoteCallbacks.cs +++ b/LibGit2Sharp/RemoteCallbacks.cs @@ -16,12 +16,24 @@ internal RemoteCallbacks( ProgressHandler onProgress = null, TransferProgressHandler onDownloadProgress = null, UpdateTipsHandler onUpdateTips = null, - Credentials credentials = null) + ICredentialsProvider credentialsProvider = null) { Progress = onProgress; DownloadTransferProgress = onDownloadProgress; UpdateTips = onUpdateTips; - Credentials = credentials; + CredentialsProvider = credentialsProvider.GetCredentialsHandler(); + } + + internal RemoteCallbacks( + ProgressHandler onProgress = null, + TransferProgressHandler onDownloadProgress = null, + UpdateTipsHandler onUpdateTips = null, + CredentialsHandler credentialsProvider = null) + { + Progress = onProgress; + DownloadTransferProgress = onDownloadProgress; + UpdateTips = onUpdateTips; + CredentialsProvider = credentialsProvider; } internal RemoteCallbacks(FetchOptions fetchOptions) @@ -30,7 +42,7 @@ internal RemoteCallbacks(FetchOptions fetchOptions) Progress = fetchOptions.OnProgress; DownloadTransferProgress = fetchOptions.OnTransferProgress; UpdateTips = fetchOptions.OnUpdateTips; - Credentials = fetchOptions.Credentials; + CredentialsProvider = fetchOptions.GetCredentialsHandler(); } #region Delegates @@ -54,9 +66,9 @@ internal RemoteCallbacks(FetchOptions fetchOptions) #endregion /// - /// The credentials to use for the credential callback. + /// The credentials to use for authentication. /// - Credentials Credentials; + private readonly CredentialsHandler CredentialsProvider; internal GitRemoteCallbacks GenerateCallbacks() { @@ -72,9 +84,9 @@ internal GitRemoteCallbacks GenerateCallbacks() callbacks.update_tips = GitUpdateTipsHandler; } - if (Credentials != null) + if (CredentialsProvider != null) { - callbacks.acquire_credentials = Credentials.GitCredentialHandler; + callbacks.acquire_credentials = GitCredentialHandler; } if (DownloadTransferProgress != null) @@ -153,6 +165,26 @@ private int GitDownloadTransferProgressHandler(ref GitTransferProgress progress, return Proxy.ConvertResultToCancelFlag(shouldContinue); } + private int GitCredentialHandler(out IntPtr ptr, IntPtr cUrl, IntPtr usernameFromUrl, GitCredentialType credTypes, IntPtr payload) + { + string url = LaxUtf8Marshaler.FromNative(cUrl); + string username = LaxUtf8Marshaler.FromNative(usernameFromUrl); + + SupportedCredentialTypes types = default(SupportedCredentialTypes); + if (credTypes.HasFlag(GitCredentialType.UserPassPlaintext)) + { + types |= SupportedCredentialTypes.UsernamePassword; + } + if (credTypes.HasFlag(GitCredentialType.Default)) + { + types |= SupportedCredentialTypes.Default; + } + + var cred = CredentialsProvider(url, username, types); + + return cred.GitCredentialHandler(out ptr, cUrl, usernameFromUrl, credTypes, payload); + } + #endregion } } diff --git a/LibGit2Sharp/RemoteCollection.cs b/LibGit2Sharp/RemoteCollection.cs index 300ed8f72..276cf6dd5 100644 --- a/LibGit2Sharp/RemoteCollection.cs +++ b/LibGit2Sharp/RemoteCollection.cs @@ -6,6 +6,7 @@ using System.Linq; using LibGit2Sharp.Core; using LibGit2Sharp.Core.Handles; +using LibGit2Sharp.Handlers; namespace LibGit2Sharp { @@ -138,6 +139,22 @@ public virtual void Remove(string name) Proxy.git_remote_delete(repository.Handle, name); } + /// + /// Renames an existing . + /// + /// The current remote name. + /// The new name the existing remote should bear. + /// The callback to be used when problems with renaming occur. (e.g. non-default fetch refspecs) + /// A new . + public virtual Remote Rename(string name, string newName, RemoteRenameFailureHandler callback = null) + { + Ensure.ArgumentNotNull(name, "name"); + Ensure.ArgumentNotNull(newName, "newName"); + + Proxy.git_remote_rename(repository.Handle, name, newName, callback); + return this[newName]; + } + private string DebuggerDisplay { get diff --git a/LibGit2Sharp/RemoveFromIndexException.cs b/LibGit2Sharp/RemoveFromIndexException.cs index 52e9ffc79..0a60b6db8 100644 --- a/LibGit2Sharp/RemoveFromIndexException.cs +++ b/LibGit2Sharp/RemoveFromIndexException.cs @@ -39,7 +39,7 @@ public RemoveFromIndexException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected RemoveFromIndexException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs index f28f6fffe..6773fe503 100644 --- a/LibGit2Sharp/Repository.cs +++ b/LibGit2Sharp/Repository.cs @@ -469,7 +469,7 @@ private static string PathFromRevparseSpec(string spec) internal GitObject Lookup(string objectish, GitObjectType type, LookUpOptions lookUpOptions) { - Ensure.ArgumentNotNullOrEmptyString(objectish, "commitOrBranchSpec"); + Ensure.ArgumentNotNullOrEmptyString(objectish, "objectish"); GitObject obj; using (GitObjectSafeHandle sh = Proxy.git_revparse_single(handle, objectish)) @@ -545,7 +545,7 @@ public static string Clone(string sourceUrl, string workdirPath, { var gitCheckoutOptions = checkoutOptionsWrapper.Options; - var remoteCallbacks = new RemoteCallbacks(null, options.OnTransferProgress, null, options.Credentials); + var remoteCallbacks = new RemoteCallbacks(null, options.OnTransferProgress, null, options.CredentialsProvider); var gitRemoteCallbacks = remoteCallbacks.GenerateCallbacks(); var cloneOpts = new GitCloneOptions @@ -792,7 +792,7 @@ public void Reset(Commit commit, IEnumerable paths = null, ExplicitPaths Ensure.ArgumentNotNull(commit, "commit"); - var changes = Diff.Compare(commit.Tree, DiffTargets.Index, paths, explicitPathsOptions); + var changes = Diff.Compare(commit.Tree, DiffTargets.Index, paths, explicitPathsOptions, new CompareOptions { Similarity = SimilarityOptions.None }); Index.Reset(changes); } @@ -1086,7 +1086,7 @@ internal MergeResult MergeFetchHeads(Signature merger, MergeOptions options) /// Revert the specified commit. /// /// The to revert. - /// The of who is performing the reverte. + /// The of who is performing the revert. /// controlling revert behavior. /// The result of the revert. public RevertResult Revert(Commit commit, Signature reverter, RevertOptions options = null) @@ -1112,7 +1112,7 @@ public RevertResult Revert(Commit commit, Signature reverter, RevertOptions opti GitRevertOpts gitRevertOpts = new GitRevertOpts() { - Mainline = (uint) options.Mainline, + Mainline = (uint)options.Mainline, MergeOpts = mergeOptions, CheckoutOpts = checkoutOptionsWrapper.Options, @@ -1120,10 +1120,10 @@ public RevertResult Revert(Commit commit, Signature reverter, RevertOptions opti Proxy.git_revert(handle, commit.Id.Oid, gitRevertOpts); - if(Index.IsFullyMerged) + if (Index.IsFullyMerged) { Commit revertCommit = null; - if(options.CommitOnSuccess) + if (options.CommitOnSuccess) { revertCommit = this.Commit(Info.Message, author: reverter, committer: reverter); } @@ -1139,6 +1139,78 @@ public RevertResult Revert(Commit commit, Signature reverter, RevertOptions opti return result; } + /// + /// Cherry-picks the specified commit. + /// + /// The to cherry-pick. + /// The of who is performing the cherry pick. + /// controlling cherry pick behavior. + /// The result of the cherry pick. + public CherryPickResult CherryPick(Commit commit, Signature committer, CherryPickOptions options = null) + { + Ensure.ArgumentNotNull(commit, "commit"); + Ensure.ArgumentNotNull(committer, "committer"); + + options = options ?? new CherryPickOptions(); + + CherryPickResult result = null; + + using (var checkoutOptionsWrapper = new GitCheckoutOptsWrapper(options)) + { + var mergeOptions = new GitMergeOpts + { + Version = 1, + MergeFileFavorFlags = options.MergeFileFavor, + MergeTreeFlags = options.FindRenames ? GitMergeTreeFlags.GIT_MERGE_TREE_FIND_RENAMES : + GitMergeTreeFlags.GIT_MERGE_TREE_NORMAL, + RenameThreshold = (uint)options.RenameThreshold, + TargetLimit = (uint)options.TargetLimit, + }; + + var gitCherryPickOpts = new GitCherryPickOptions() + { + Mainline = (uint)options.Mainline, + MergeOpts = mergeOptions, + + CheckoutOpts = checkoutOptionsWrapper.Options, + }; + + Proxy.git_cherrypick(handle, commit.Id.Oid, gitCherryPickOpts); + + if (Index.IsFullyMerged) + { + Commit cherryPickCommit = null; + if (options.CommitOnSuccess) + { + cherryPickCommit = this.Commit(Info.Message, commit.Author, committer); + } + + result = new CherryPickResult(CherryPickStatus.CherryPicked, cherryPickCommit); + } + else + { + result = new CherryPickResult(CherryPickStatus.Conflicts); + } + } + + return result; + } + + private FastForwardStrategy FastForwardStrategyFromMergePreference(GitMergePreference preference) + { + switch (preference) + { + case GitMergePreference.GIT_MERGE_PREFERENCE_NONE: + return FastForwardStrategy.Default; + case GitMergePreference.GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY: + return FastForwardStrategy.FastForwardOnly; + case GitMergePreference.GIT_MERGE_PREFERENCE_NO_FASTFORWARD: + return FastForwardStrategy.NoFastFoward; + default: + throw new InvalidOperationException(String.Format("Unknown merge preference: {0}", preference)); + } + } + /// /// Internal implementation of merge. /// @@ -1160,7 +1232,10 @@ private MergeResult Merge(GitMergeHeadHandle[] mergeHeads, Signature merger, Mer return new MergeResult(MergeStatus.UpToDate); } - switch(options.FastForwardStrategy) + FastForwardStrategy fastForwardStrategy = (options.FastForwardStrategy != FastForwardStrategy.Default) ? + options.FastForwardStrategy : FastForwardStrategyFromMergePreference(mergePreference); + + switch(fastForwardStrategy) { case FastForwardStrategy.Default: if (mergeAnalysis.HasFlag(GitMergeAnalysis.GIT_MERGE_ANALYSIS_FASTFORWARD)) @@ -1276,7 +1351,7 @@ private MergeResult FastForwardMerge(GitMergeHeadHandle mergeHead, Signature mer Commit fastForwardCommit = (Commit) Lookup(id, ObjectType.Commit); Ensure.GitObjectIsNotNull(fastForwardCommit, id.Sha); - CheckoutTree(fastForwardCommit.Tree, null, options); + CheckoutTree(fastForwardCommit.Tree, null, new FastForwardCheckoutOptionsAdapter(options)); var reference = Refs.Head.ResolveToDirectReference(); diff --git a/LibGit2Sharp/RepositoryExtensions.cs b/LibGit2Sharp/RepositoryExtensions.cs index 43907b767..278614dec 100644 --- a/LibGit2Sharp/RepositoryExtensions.cs +++ b/LibGit2Sharp/RepositoryExtensions.cs @@ -68,7 +68,7 @@ private static void EnsureNoGitLink() where T : GitObject /// The name of the tag to create. public static Tag ApplyTag(this IRepository repository, string tagName) { - return ApplyTag(repository, tagName, repository.Head.CanonicalName); + return repository.Tags.Add(tagName, RetrieveHeadCommit(repository)); } /// @@ -91,7 +91,16 @@ public static Tag ApplyTag(this IRepository repository, string tagName, string o /// The annotation message. public static Tag ApplyTag(this IRepository repository, string tagName, Signature tagger, string message) { - return ApplyTag(repository, tagName, repository.Head.CanonicalName, tagger, message); + return repository.Tags.Add(tagName, RetrieveHeadCommit(repository), tagger, message); + } + + private static Commit RetrieveHeadCommit(IRepository repository) + { + Commit commit = repository.Head.Tip; + + Ensure.GitObjectIsNotNull(commit, "HEAD", m => new UnbornBranchException(m)); + + return commit; } /// diff --git a/LibGit2Sharp/RepositoryNotFoundException.cs b/LibGit2Sharp/RepositoryNotFoundException.cs index 114da2ea0..b07ee913c 100644 --- a/LibGit2Sharp/RepositoryNotFoundException.cs +++ b/LibGit2Sharp/RepositoryNotFoundException.cs @@ -39,7 +39,7 @@ public RepositoryNotFoundException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected RepositoryNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/RevertOptions.cs b/LibGit2Sharp/RevertOptions.cs index 49a350e58..2e48f04ed 100644 --- a/LibGit2Sharp/RevertOptions.cs +++ b/LibGit2Sharp/RevertOptions.cs @@ -49,7 +49,7 @@ public RevertOptions() /// /// When reverting a merge commit, the parent number to consider as - /// mainline, starting from offset 1. + /// mainline, starting from offset 1. /// /// As a merge commit has multiple parents, reverting a merge commit /// will reverse all the changes brought in by the merge except for @@ -104,7 +104,6 @@ CheckoutStrategy IConvertableToGitCheckoutOpts.CheckoutStrategy get { return CheckoutStrategy.GIT_CHECKOUT_SAFE | - CheckoutStrategy.GIT_CHECKOUT_ALLOW_CONFLICTS | GitCheckoutOptsWrapper.CheckoutStrategyFromFileConflictStrategy(FileConflictStrategy); } } diff --git a/LibGit2Sharp/StageOptions.cs b/LibGit2Sharp/StageOptions.cs new file mode 100644 index 000000000..7701b8948 --- /dev/null +++ b/LibGit2Sharp/StageOptions.cs @@ -0,0 +1,22 @@ +using System; + +namespace LibGit2Sharp +{ + /// + /// Options to define file staging behavior. + /// + public sealed class StageOptions + { + /// + /// Stage ignored files. (Default = false) + /// + public bool IncludeIgnored { get; set; } + + /// + /// If set, the passed paths will be treated as explicit paths. + /// Use these options to determine how unmatched explicit paths + /// should be handled. (Default = null) + /// + public ExplicitPathsOptions ExplicitPathsOptions { get; set; } + } +} diff --git a/LibGit2Sharp/SupportedCredentialTypes.cs b/LibGit2Sharp/SupportedCredentialTypes.cs new file mode 100644 index 000000000..bc38a259e --- /dev/null +++ b/LibGit2Sharp/SupportedCredentialTypes.cs @@ -0,0 +1,22 @@ +using System; + +namespace LibGit2Sharp +{ + /// + /// Credential types supported by the server. If the server supports a particular type of + /// authentication, it will be set to true. + /// + [Flags] + public enum SupportedCredentialTypes + { + /// + /// Plain username and password combination + /// + UsernamePassword = (1 << 0), + + /// + /// Ask Windows to provide its default credentials for the current user (e.g. NTLM) + /// + Default = (1 << 1), + } +} diff --git a/LibGit2Sharp/TreeChanges.cs b/LibGit2Sharp/TreeChanges.cs index c05c3c077..1529a25cd 100644 --- a/LibGit2Sharp/TreeChanges.cs +++ b/LibGit2Sharp/TreeChanges.cs @@ -61,23 +61,10 @@ private int FileCallback(GitDiffDelta delta, float progress, IntPtr payload) private void AddFileChange(GitDiffDelta delta) { - var newFilePath = LaxFilePathMarshaler.FromNative(delta.NewFile.Path); + var treeEntryChanges = new TreeEntryChanges(delta); - var oldFilePath = LaxFilePathMarshaler.FromNative(delta.OldFile.Path); - var newMode = (Mode)delta.NewFile.Mode; - var oldMode = (Mode)delta.OldFile.Mode; - var newOid = delta.NewFile.Id; - var oldOid = delta.OldFile.Id; - - if (delta.Status == ChangeKind.Untracked || delta.Status == ChangeKind.Ignored) - { - delta.Status = ChangeKind.Added; - } - - var diffFile = new TreeEntryChanges(newFilePath, newMode, newOid, delta.Status, oldFilePath, oldMode, oldOid); - - fileDispatcher[delta.Status](this, diffFile); - changes.Add(newFilePath, diffFile); + fileDispatcher[treeEntryChanges.Status](this, treeEntryChanges); + changes.Add(treeEntryChanges.Path, treeEntryChanges); } #region IEnumerable Members diff --git a/LibGit2Sharp/TreeEntryChanges.cs b/LibGit2Sharp/TreeEntryChanges.cs index 62e76f04c..205ff42c3 100644 --- a/LibGit2Sharp/TreeEntryChanges.cs +++ b/LibGit2Sharp/TreeEntryChanges.cs @@ -16,15 +16,19 @@ public class TreeEntryChanges protected TreeEntryChanges() { } - internal TreeEntryChanges(FilePath path, Mode mode, ObjectId oid, ChangeKind status, FilePath oldPath, Mode oldMode, ObjectId oldOid) + internal TreeEntryChanges(GitDiffDelta delta) { - Path = path.Native; - Mode = mode; - Oid = oid; - Status = status; - OldPath = oldPath.Native; - OldMode = oldMode; - OldOid = oldOid; + Path = LaxFilePathMarshaler.FromNative(delta.NewFile.Path).Native; + OldPath = LaxFilePathMarshaler.FromNative(delta.OldFile.Path).Native; + + Mode = (Mode)delta.NewFile.Mode; + OldMode = (Mode)delta.OldFile.Mode; + Oid = delta.NewFile.Id; + OldOid = delta.OldFile.Id; + + Status = (delta.Status == ChangeKind.Untracked || delta.Status == ChangeKind.Ignored) + ? ChangeKind.Added + : delta.Status; } /// diff --git a/LibGit2Sharp/UnbornBranchException.cs b/LibGit2Sharp/UnbornBranchException.cs index 5899321ea..2704d1a93 100644 --- a/LibGit2Sharp/UnbornBranchException.cs +++ b/LibGit2Sharp/UnbornBranchException.cs @@ -39,7 +39,7 @@ public UnbornBranchException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected UnbornBranchException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/UnmatchedPathException.cs b/LibGit2Sharp/UnmatchedPathException.cs index 19f061efd..0227e9bcf 100644 --- a/LibGit2Sharp/UnmatchedPathException.cs +++ b/LibGit2Sharp/UnmatchedPathException.cs @@ -39,7 +39,7 @@ public UnmatchedPathException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected UnmatchedPathException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/UnmergedIndexEntriesException.cs b/LibGit2Sharp/UnmergedIndexEntriesException.cs index 0963c6b87..f221b4a61 100644 --- a/LibGit2Sharp/UnmergedIndexEntriesException.cs +++ b/LibGit2Sharp/UnmergedIndexEntriesException.cs @@ -40,7 +40,7 @@ public UnmergedIndexEntriesException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected UnmergedIndexEntriesException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/UserCanceledException.cs b/LibGit2Sharp/UserCanceledException.cs index a5c226679..fdc03396e 100644 --- a/LibGit2Sharp/UserCanceledException.cs +++ b/LibGit2Sharp/UserCanceledException.cs @@ -39,7 +39,7 @@ public UserCancelledException(string message, Exception innerException) /// /// Initializes a new instance of the class with a serialized data. /// - /// The that holds the serialized object data about the exception being thrown. + /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected UserCancelledException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/LibGit2Sharp/libgit2_hash.txt b/LibGit2Sharp/libgit2_hash.txt index 44e16bb22..a34df7394 100644 --- a/LibGit2Sharp/libgit2_hash.txt +++ b/LibGit2Sharp/libgit2_hash.txt @@ -1 +1 @@ -90befde4a1938641dfdb9a7bdb9f361d1de5c26f +69db89342712f47ee84d9368823ec294a0db1c65 diff --git a/libgit2 b/libgit2 index 90befde4a..69db89342 160000 --- a/libgit2 +++ b/libgit2 @@ -1 +1 @@ -Subproject commit 90befde4a1938641dfdb9a7bdb9f361d1de5c26f +Subproject commit 69db89342712f47ee84d9368823ec294a0db1c65