diff options
author | nulltoken <emeric.fermas@gmail.com> | 2015-11-06 09:59:43 +0300 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2015-11-06 09:59:43 +0300 |
commit | 28f1bbc10f4f50eb437dcb9aa041dab3850754f5 (patch) | |
tree | 29b7652813c8a055cd20592db9d5a4cd0f2b81f9 | |
parent | e90dc974ba79891eda1f18be80d5d85123b1c11a (diff) | |
parent | f37a4ebb17eb1301f9039045e11ccb64a8398cc7 (diff) |
Merge pull request #1221 from libgit2/ntk/xml_doc
Fix compilation warning
-rw-r--r-- | LibGit2Sharp.Tests/MergeFixture.cs | 9 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/NetworkFixture.cs | 2 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/PackBuilderFixture.cs | 14 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/RevertFixture.cs | 4 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/SmartSubtransportFixture.cs | 2 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/StatusFixture.cs | 2 | ||||
-rw-r--r-- | LibGit2Sharp.Tests/TestHelpers/FileExportFilter.cs | 1 | ||||
-rw-r--r-- | LibGit2Sharp/Filter.cs | 1 | ||||
-rw-r--r-- | LibGit2Sharp/IRepository.cs | 2 | ||||
-rw-r--r-- | LibGit2Sharp/RebaseOperationImpl.cs | 10 |
10 files changed, 15 insertions, 32 deletions
diff --git a/LibGit2Sharp.Tests/MergeFixture.cs b/LibGit2Sharp.Tests/MergeFixture.cs index 2153e85e..55282e10 100644 --- a/LibGit2Sharp.Tests/MergeFixture.cs +++ b/LibGit2Sharp.Tests/MergeFixture.cs @@ -361,7 +361,7 @@ namespace LibGit2Sharp.Tests OnCheckoutProgress = (path, completed, total) => wasCalled = true, }; - MergeResult result = repo.Merge(commitToMerge, Constants.Signature, options); + repo.Merge(commitToMerge, Constants.Signature, options); Assert.True(wasCalled); } @@ -384,7 +384,7 @@ namespace LibGit2Sharp.Tests CheckoutNotifyFlags = CheckoutNotifyFlags.Updated, }; - MergeResult result = repo.Merge(commitToMerge, Constants.Signature, options); + repo.Merge(commitToMerge, Constants.Signature, options); Assert.True(wasCalled); Assert.Equal(CheckoutNotifyFlags.Updated, actualNotifyFlags); @@ -406,7 +406,7 @@ namespace LibGit2Sharp.Tests OnCheckoutProgress = (path, completed, total) => wasCalled = true, }; - MergeResult result = repo.Merge(commitToMerge, Constants.Signature, options); + repo.Merge(commitToMerge, Constants.Signature, options); Assert.True(wasCalled); } @@ -429,7 +429,7 @@ namespace LibGit2Sharp.Tests CheckoutNotifyFlags = CheckoutNotifyFlags.Updated, }; - MergeResult result = repo.Merge(commitToMerge, Constants.Signature, options); + repo.Merge(commitToMerge, Constants.Signature, options); Assert.True(wasCalled); Assert.Equal(CheckoutNotifyFlags.Updated, actualNotifyFlags); @@ -665,7 +665,6 @@ namespace LibGit2Sharp.Tests Branch branch = repo.Branches[conflictBranchName]; Assert.NotNull(branch); - var status = repo.RetrieveStatus(); MergeOptions mergeOptions = new MergeOptions() { MergeFileFavor = fileFavorFlag, diff --git a/LibGit2Sharp.Tests/NetworkFixture.cs b/LibGit2Sharp.Tests/NetworkFixture.cs index 3383234f..46623a66 100644 --- a/LibGit2Sharp.Tests/NetworkFixture.cs +++ b/LibGit2Sharp.Tests/NetworkFixture.cs @@ -189,7 +189,7 @@ namespace LibGit2Sharp.Tests using (var repo = new Repository(repoPath)) { // Set up remote - Remote remote = repo.Network.Remotes.Add(remoteName, url); + repo.Network.Remotes.Add(remoteName, url); // Set up tracking information repo.Branches.Update(repo.Head, diff --git a/LibGit2Sharp.Tests/PackBuilderFixture.cs b/LibGit2Sharp.Tests/PackBuilderFixture.cs index 44e35815..3d0071df 100644 --- a/LibGit2Sharp.Tests/PackBuilderFixture.cs +++ b/LibGit2Sharp.Tests/PackBuilderFixture.cs @@ -103,23 +103,13 @@ namespace LibGit2Sharp.Tests [Fact] public void ExceptionIfPathDoesNotExist() { - PackBuilderOptions pbo; - - Assert.Throws<DirectoryNotFoundException>(() => - { - pbo = new PackBuilderOptions("aaa"); - }); + Assert.Throws<DirectoryNotFoundException>(() => new PackBuilderOptions("aaa")); } [Fact] public void ExceptionIfPathEqualsNull() { - PackBuilderOptions pbo; - - Assert.Throws<ArgumentNullException>(() => - { - pbo = new PackBuilderOptions(null); - }); + Assert.Throws<ArgumentNullException>(() => new PackBuilderOptions(null)); } [Fact] diff --git a/LibGit2Sharp.Tests/RevertFixture.cs b/LibGit2Sharp.Tests/RevertFixture.cs index d01fb6a7..b5772876 100644 --- a/LibGit2Sharp.Tests/RevertFixture.cs +++ b/LibGit2Sharp.Tests/RevertFixture.cs @@ -67,8 +67,6 @@ namespace LibGit2Sharp.Tests string path = SandboxRevertTestRepo(); using (var repo = new Repository(path)) { - string modifiedFileFullPath = Path.Combine(repo.Info.WorkingDirectory, revertedFile); - // Checkout the revert branch. Branch branch = repo.Checkout(revertBranchName); Assert.NotNull(branch); @@ -160,6 +158,7 @@ namespace LibGit2Sharp.Tests }; RevertResult result = repo.Revert(repo.Head.Tip.Parents.First(), Constants.Signature, options); + Assert.Equal(RevertStatus.Conflicts, result.Status); // Verify there is a conflict. Assert.False(repo.Index.IsFullyMerged); @@ -242,6 +241,7 @@ namespace LibGit2Sharp.Tests repo.Revert(repo.Head.Tip, Constants.Signature, options); Assert.True(wasCalled); + Assert.Equal(CheckoutNotifyFlags.Updated, actualNotifyFlags); } } diff --git a/LibGit2Sharp.Tests/SmartSubtransportFixture.cs b/LibGit2Sharp.Tests/SmartSubtransportFixture.cs index 9d71d3f3..452bc8a8 100644 --- a/LibGit2Sharp.Tests/SmartSubtransportFixture.cs +++ b/LibGit2Sharp.Tests/SmartSubtransportFixture.cs @@ -38,7 +38,7 @@ namespace LibGit2Sharp.Tests registration = GlobalSettings.RegisterSmartSubtransport<MockSmartSubtransport>(scheme); Assert.NotNull(registration); - using (var repo = new Repository(scd.DirectoryPath)) + using (var repo = new Repository(repoPath)) { Remote remote = repo.Network.Remotes.Add(remoteName, url); diff --git a/LibGit2Sharp.Tests/StatusFixture.cs b/LibGit2Sharp.Tests/StatusFixture.cs index 773eb7e4..3c9bc002 100644 --- a/LibGit2Sharp.Tests/StatusFixture.cs +++ b/LibGit2Sharp.Tests/StatusFixture.cs @@ -99,7 +99,7 @@ namespace LibGit2Sharp.Tests var path = SandboxStandardTestRepoGitDir(); using (var repo = new Repository(path)) { - Assert.Throws<AmbiguousSpecificationException>(() => { FileStatus status = repo.RetrieveStatus("1"); }); + Assert.Throws<AmbiguousSpecificationException>(() => { repo.RetrieveStatus("1"); }); } } diff --git a/LibGit2Sharp.Tests/TestHelpers/FileExportFilter.cs b/LibGit2Sharp.Tests/TestHelpers/FileExportFilter.cs index f68a0341..b03b8d2c 100644 --- a/LibGit2Sharp.Tests/TestHelpers/FileExportFilter.cs +++ b/LibGit2Sharp.Tests/TestHelpers/FileExportFilter.cs @@ -77,7 +77,6 @@ namespace LibGit2Sharp.Tests.TestHelpers { SmudgeCalledCount++; - string filename = Path.GetFileName(path); StringBuilder text = new StringBuilder(); byte[] buffer = new byte[64 * 1024]; diff --git a/LibGit2Sharp/Filter.cs b/LibGit2Sharp/Filter.cs index e7dbc910..b9aab9c7 100644 --- a/LibGit2Sharp/Filter.cs +++ b/LibGit2Sharp/Filter.cs @@ -52,7 +52,6 @@ namespace LibGit2Sharp private readonly string name; private readonly IEnumerable<FilterAttributeEntry> attributes; private readonly GitFilter gitFilter; - private readonly object @lock = new object(); private GitWriteStream thisStream; private GitWriteStream nextStream; diff --git a/LibGit2Sharp/IRepository.cs b/LibGit2Sharp/IRepository.cs index e4524dde..317a0e76 100644 --- a/LibGit2Sharp/IRepository.cs +++ b/LibGit2Sharp/IRepository.cs @@ -171,7 +171,7 @@ namespace LibGit2Sharp /// </summary> /// <param name="resetMode">Flavor of reset operation to perform.</param> /// <param name="commit">The target commit object.</param> - /// <param name="opts">Collection of parameters controlling checkout behavior.</param> + /// <param name="options">Collection of parameters controlling checkout behavior.</param> void Reset(ResetMode resetMode, Commit commit, CheckoutOptions options); /// <summary> diff --git a/LibGit2Sharp/RebaseOperationImpl.cs b/LibGit2Sharp/RebaseOperationImpl.cs index 9fb3cf22..abb4537c 100644 --- a/LibGit2Sharp/RebaseOperationImpl.cs +++ b/LibGit2Sharp/RebaseOperationImpl.cs @@ -43,24 +43,20 @@ namespace LibGit2Sharp else { // No step to apply - need to complete the rebase. - rebaseResult = CompleteRebase(rebaseOperationHandle, committer, rebaseResult); + rebaseResult = CompleteRebase(rebaseOperationHandle, committer); } } return rebaseResult; } - private static RebaseResult CompleteRebase(RebaseSafeHandle rebaseOperationHandle, Identity committer, RebaseResult rebaseResult) + private static RebaseResult CompleteRebase(RebaseSafeHandle rebaseOperationHandle, Identity committer) { long totalStepCount = Proxy.git_rebase_operation_entrycount(rebaseOperationHandle); - GitRebaseOptions gitRebaseOptions = new GitRebaseOptions() - { - version = 1, - }; // Rebase is completed! Proxy.git_rebase_finish(rebaseOperationHandle, committer); - rebaseResult = new RebaseResult(RebaseStatus.Complete, + var rebaseResult = new RebaseResult(RebaseStatus.Complete, totalStepCount, totalStepCount, null); |