Skip to content

Commit 28f1bbc

Browse files
committed
Merge pull request #1221 from libgit2/ntk/xml_doc
Fix compilation warning
2 parents e90dc97 + f37a4eb commit 28f1bbc

File tree

10 files changed

+15
-32
lines changed

10 files changed

+15
-32
lines changed

‎LibGit2Sharp.Tests/MergeFixture.cs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public void MergeReportsCheckoutProgress()
361361
OnCheckoutProgress=(path,completed,total)=>wasCalled=true,
362362
};
363363

364-
MergeResultresult=repo.Merge(commitToMerge,Constants.Signature,options);
364+
repo.Merge(commitToMerge,Constants.Signature,options);
365365

366366
Assert.True(wasCalled);
367367
}
@@ -384,7 +384,7 @@ public void MergeReportsCheckoutNotifications()
384384
CheckoutNotifyFlags=CheckoutNotifyFlags.Updated,
385385
};
386386

387-
MergeResultresult=repo.Merge(commitToMerge,Constants.Signature,options);
387+
repo.Merge(commitToMerge,Constants.Signature,options);
388388

389389
Assert.True(wasCalled);
390390
Assert.Equal(CheckoutNotifyFlags.Updated,actualNotifyFlags);
@@ -406,7 +406,7 @@ public void FastForwardMergeReportsCheckoutProgress()
406406
OnCheckoutProgress=(path,completed,total)=>wasCalled=true,
407407
};
408408

409-
MergeResultresult=repo.Merge(commitToMerge,Constants.Signature,options);
409+
repo.Merge(commitToMerge,Constants.Signature,options);
410410

411411
Assert.True(wasCalled);
412412
}
@@ -429,7 +429,7 @@ public void FastForwardMergeReportsCheckoutNotifications()
429429
CheckoutNotifyFlags=CheckoutNotifyFlags.Updated,
430430
};
431431

432-
MergeResultresult=repo.Merge(commitToMerge,Constants.Signature,options);
432+
repo.Merge(commitToMerge,Constants.Signature,options);
433433

434434
Assert.True(wasCalled);
435435
Assert.Equal(CheckoutNotifyFlags.Updated,actualNotifyFlags);
@@ -665,7 +665,6 @@ public void MergeCanSpecifyMergeFileFavorOption(MergeFileFavor fileFavorFlag)
665665
Branchbranch=repo.Branches[conflictBranchName];
666666
Assert.NotNull(branch);
667667

668-
varstatus=repo.RetrieveStatus();
669668
MergeOptionsmergeOptions=newMergeOptions()
670669
{
671670
MergeFileFavor=fileFavorFlag,

‎LibGit2Sharp.Tests/NetworkFixture.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public void CanPullIntoEmptyRepo()
189189
using(varrepo=newRepository(repoPath))
190190
{
191191
// Set up remote
192-
Remoteremote=repo.Network.Remotes.Add(remoteName,url);
192+
repo.Network.Remotes.Add(remoteName,url);
193193

194194
// Set up tracking information
195195
repo.Branches.Update(repo.Head,

‎LibGit2Sharp.Tests/PackBuilderFixture.cs‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,13 @@ internal void AddingObjectsTestDelegate(IRepository repo, PackBuilder builder)
103103
[Fact]
104104
publicvoidExceptionIfPathDoesNotExist()
105105
{
106-
PackBuilderOptionspbo;
107-
108-
Assert.Throws<DirectoryNotFoundException>(()=>
109-
{
110-
pbo=newPackBuilderOptions("aaa");
111-
});
106+
Assert.Throws<DirectoryNotFoundException>(()=>newPackBuilderOptions("aaa"));
112107
}
113108

114109
[Fact]
115110
publicvoidExceptionIfPathEqualsNull()
116111
{
117-
PackBuilderOptionspbo;
118-
119-
Assert.Throws<ArgumentNullException>(()=>
120-
{
121-
pbo=newPackBuilderOptions(null);
122-
});
112+
Assert.Throws<ArgumentNullException>(()=>newPackBuilderOptions(null));
123113
}
124114

125115
[Fact]

‎LibGit2Sharp.Tests/RevertFixture.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ public void CanRevertAndNotCommit()
6767
stringpath=SandboxRevertTestRepo();
6868
using(varrepo=newRepository(path))
6969
{
70-
stringmodifiedFileFullPath=Path.Combine(repo.Info.WorkingDirectory,revertedFile);
71-
7270
// Checkout the revert branch.
7371
Branchbranch=repo.Checkout(revertBranchName);
7472
Assert.NotNull(branch);
@@ -160,6 +158,7 @@ public void RevertWithFileConflictStrategyOption(CheckoutFileConflictStrategy co
160158
};
161159

162160
RevertResultresult=repo.Revert(repo.Head.Tip.Parents.First(),Constants.Signature,options);
161+
Assert.Equal(RevertStatus.Conflicts,result.Status);
163162

164163
// Verify there is a conflict.
165164
Assert.False(repo.Index.IsFullyMerged);
@@ -242,6 +241,7 @@ public void RevertReportsCheckoutNotification()
242241
repo.Revert(repo.Head.Tip,Constants.Signature,options);
243242

244243
Assert.True(wasCalled);
244+
Assert.Equal(CheckoutNotifyFlags.Updated,actualNotifyFlags);
245245
}
246246
}
247247

‎LibGit2Sharp.Tests/SmartSubtransportFixture.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void CustomSmartSubtransportTest(string scheme, string url)
3838
registration=GlobalSettings.RegisterSmartSubtransport<MockSmartSubtransport>(scheme);
3939
Assert.NotNull(registration);
4040

41-
using(varrepo=newRepository(scd.DirectoryPath))
41+
using(varrepo=newRepository(repoPath))
4242
{
4343
Remoteremote=repo.Network.Remotes.Add(remoteName,url);
4444

‎LibGit2Sharp.Tests/StatusFixture.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void RetrievingTheStatusOfADirectoryThrows()
9999
varpath=SandboxStandardTestRepoGitDir();
100100
using(varrepo=newRepository(path))
101101
{
102-
Assert.Throws<AmbiguousSpecificationException>(()=>{FileStatusstatus=repo.RetrieveStatus("1");});
102+
Assert.Throws<AmbiguousSpecificationException>(()=>{repo.RetrieveStatus("1");});
103103
}
104104
}
105105

‎LibGit2Sharp.Tests/TestHelpers/FileExportFilter.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ protected override void Smudge(string path, string root, Stream input, Stream ou
7777
{
7878
SmudgeCalledCount++;
7979

80-
stringfilename=Path.GetFileName(path);
8180
StringBuildertext=newStringBuilder();
8281

8382
byte[]buffer=newbyte[64*1024];

‎LibGit2Sharp/Filter.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ protected Filter(string name, IEnumerable<FilterAttributeEntry> attributes)
5252
privatereadonlystringname;
5353
privatereadonlyIEnumerable<FilterAttributeEntry>attributes;
5454
privatereadonlyGitFiltergitFilter;
55-
privatereadonlyobject@lock=newobject();
5655

5756
privateGitWriteStreamthisStream;
5857
privateGitWriteStreamnextStream;

‎LibGit2Sharp/IRepository.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public interface IRepository : IDisposable
171171
/// </summary>
172172
/// <param name="resetMode">Flavor of reset operation to perform.</param>
173173
/// <param name="commit">The target commit object.</param>
174-
/// <param name="opts">Collection of parameters controlling checkout behavior.</param>
174+
/// <param name="options">Collection of parameters controlling checkout behavior.</param>
175175
voidReset(ResetModeresetMode,Commitcommit,CheckoutOptionsoptions);
176176

177177
/// <summary>

‎LibGit2Sharp/RebaseOperationImpl.cs‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,20 @@ public static RebaseResult Run(RebaseSafeHandle rebaseOperationHandle,
4343
else
4444
{
4545
// No step to apply - need to complete the rebase.
46-
rebaseResult=CompleteRebase(rebaseOperationHandle,committer,rebaseResult);
46+
rebaseResult=CompleteRebase(rebaseOperationHandle,committer);
4747
}
4848
}
4949

5050
returnrebaseResult;
5151
}
5252

53-
privatestaticRebaseResultCompleteRebase(RebaseSafeHandlerebaseOperationHandle,Identitycommitter,RebaseResultrebaseResult)
53+
privatestaticRebaseResultCompleteRebase(RebaseSafeHandlerebaseOperationHandle,Identitycommitter)
5454
{
5555
longtotalStepCount=Proxy.git_rebase_operation_entrycount(rebaseOperationHandle);
56-
GitRebaseOptionsgitRebaseOptions=newGitRebaseOptions()
57-
{
58-
version=1,
59-
};
6056

6157
// Rebase is completed!
6258
Proxy.git_rebase_finish(rebaseOperationHandle,committer);
63-
rebaseResult=newRebaseResult(RebaseStatus.Complete,
59+
varrebaseResult=newRebaseResult(RebaseStatus.Complete,
6460
totalStepCount,
6561
totalStepCount,
6662
null);

0 commit comments

Comments
(0)