Skip to content

Commit 0eed453

Browse files
committed
Run dotnet format
1 parent d935c49 commit 0eed453

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+266
-261
lines changed

LibGit2Sharp.Tests/BlameFixture.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public void CanBlameFromVariousTypes()
6262
string path = SandboxBareTestRepo();
6363
using (var repo = new Repository(path))
6464
{
65-
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions {StartingAt = "HEAD" }));
66-
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions {StartingAt = repo.Head }));
67-
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions {StartingAt = repo.Head.Tip }));
68-
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions {StartingAt = repo.Branches["master"]}));
65+
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions { StartingAt = "HEAD" }));
66+
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions { StartingAt = repo.Head }));
67+
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions { StartingAt = repo.Head.Tip }));
68+
AssertCorrectHeadBlame(repo.Blame("README", new BlameOptions { StartingAt = repo.Branches["master"] }));
6969
}
7070
}
7171

@@ -78,7 +78,7 @@ public void CanStopBlame()
7878
// $ git blame .\new.txt
7979
// 9fd738e8 (Scott Chacon 2010-05-24 10:19:19 -0700 1) my new file
8080
// (be3563a comes after 9fd738e8)
81-
var blame = repo.Blame("new.txt", new BlameOptions {StoppingAt = "be3563a"});
81+
var blame = repo.Blame("new.txt", new BlameOptions { StoppingAt = "be3563a" });
8282
Assert.StartsWith("be3563a", blame[0].FinalCommit.Sha);
8383
}
8484
}

LibGit2Sharp.Tests/CheckoutFixture.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public void CanForcefullyCheckoutWithConflictingStagedChanges()
269269
Assert.Throws<CheckoutConflictException>(() => Commands.Checkout(repo, master.CanonicalName));
270270

271271
// Checkout with force option should succeed.
272-
Commands.Checkout(repo, master.CanonicalName, new CheckoutOptions() { CheckoutModifiers = CheckoutModifiers.Force});
272+
Commands.Checkout(repo, master.CanonicalName, new CheckoutOptions() { CheckoutModifiers = CheckoutModifiers.Force });
273273

274274
// Assert that master branch is checked out.
275275
Assert.True(repo.Branches["master"].IsCurrentRepositoryHead);
@@ -411,7 +411,7 @@ public void CheckingOutThroughBranchCallsCheckoutProgress()
411411

412412
Branch branch = repo.Branches[otherBranchName];
413413
Commands.Checkout(repo, branch,
414-
new CheckoutOptions { OnCheckoutProgress = (path, completed, total) => wasCalled = true});
414+
new CheckoutOptions { OnCheckoutProgress = (path, completed, total) => wasCalled = true });
415415

416416
Assert.True(wasCalled);
417417
}
@@ -427,7 +427,7 @@ public void CheckingOutThroughRepositoryCallsCheckoutProgress()
427427
PopulateBasicRepository(repo);
428428
bool wasCalled = false;
429429

430-
Commands.Checkout(repo, otherBranchName, new CheckoutOptions() { OnCheckoutProgress = (path, completed, total) => wasCalled = true});
430+
Commands.Checkout(repo, otherBranchName, new CheckoutOptions() { OnCheckoutProgress = (path, completed, total) => wasCalled = true });
431431

432432
Assert.True(wasCalled);
433433
}
@@ -779,7 +779,7 @@ public void CheckoutFromDetachedHead(string commitPointer)
779779
public void CheckoutBranchFromDetachedHead()
780780
{
781781
string path = SandboxStandardTestRepo();
782-
using (var repo = new Repository(path, new RepositoryOptions{ Identity = Constants.Identity }))
782+
using (var repo = new Repository(path, new RepositoryOptions { Identity = Constants.Identity }))
783783
{
784784
// Set the working directory to the current head
785785
ResetAndCleanWorkingDirectory(repo);

LibGit2Sharp.Tests/ConflictFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private static List<object[]> RenameConflictData
4848

4949
[Theory]
5050
[InlineData(true, "ancestor-and-ours.txt", true, false, FileStatus.DeletedFromIndex, 2)]
51-
[InlineData(false, "ancestor-and-ours.txt", true, true, FileStatus.DeletedFromIndex |FileStatus.NewInWorkdir, 2)]
51+
[InlineData(false, "ancestor-and-ours.txt", true, true, FileStatus.DeletedFromIndex | FileStatus.NewInWorkdir, 2)]
5252
[InlineData(true, "ancestor-and-theirs.txt", true, false, FileStatus.Nonexistent, 2)]
5353
[InlineData(false, "ancestor-and-theirs.txt", true, true, FileStatus.NewInWorkdir, 2)]
5454
[InlineData(true, "ancestor-only.txt", false, false, FileStatus.Nonexistent, 1)]
@@ -101,7 +101,7 @@ public void CanGetOriginalNamesOfRenameConflicts()
101101
Assert.Equal(expected.Count, actual.Count());
102102

103103
int i = 0;
104-
foreach(var name in actual)
104+
foreach (var name in actual)
105105
{
106106
Assert.Equal(expected[i][0], name.Ancestor);
107107
Assert.Equal(expected[i][1], name.Ours);

LibGit2Sharp.Tests/DescribeFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void CanDescribeACommit()
2323

2424
// No lightweight tags can either be used to describe "master"
2525
Assert.Throws<NotFoundException>(() => repo.Describe(masterTip,
26-
new DescribeOptions{ Strategy = DescribeStrategy.Tags }));
26+
new DescribeOptions { Strategy = DescribeStrategy.Tags }));
2727

2828
repo.ApplyTag("myTag", "5b5b025afb0b4c913b4c338a42934a3863bf3644");
2929
Assert.Equal("myTag-5-g4c062a6", repo.Describe(masterTip,
@@ -47,7 +47,7 @@ public void CanDescribeACommit()
4747
var anotherTip = repo.Branches["ForLackOfABetterName"].Tip;
4848
Assert.Equal("test", repo.Describe(anotherTip));
4949
Assert.Equal("test-0-g7b43849", repo.Describe(anotherTip,
50-
new DescribeOptions{ AlwaysRenderLongFormat = true }));
50+
new DescribeOptions { AlwaysRenderLongFormat = true }));
5151
}
5252
}
5353

LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ public void DiffThrowsANotFoundExceptionIfATreeIsMissing()
12631263
string repoPath = SandboxBareTestRepo();
12641264

12651265
// Manually delete the tree object to simulate a partial clone
1266-
File.Delete(Path.Combine(repoPath, "objects", "58", "1f9824ecaf824221bd36edf5430f2739a7c4f5"));
1266+
File.Delete(Path.Combine(repoPath, "objects", "58", "1f9824ecaf824221bd36edf5430f2739a7c4f5"));
12671267

12681268
using (var repo = new Repository(repoPath))
12691269
{
@@ -1282,12 +1282,12 @@ public void DiffThrowsANotFoundExceptionIfATreeIsMissing()
12821282

12831283
Assert.Throws<NotFoundException>(() =>
12841284
{
1285-
using (repo.Diff.Compare<TreeChanges>(commit.Tree, otherCommit.Tree)) {}
1285+
using (repo.Diff.Compare<TreeChanges>(commit.Tree, otherCommit.Tree)) { }
12861286
});
12871287

12881288
Assert.Throws<NotFoundException>(() =>
12891289
{
1290-
using (repo.Diff.Compare<TreeChanges>(otherCommit.Tree, commit.Tree)) {}
1290+
using (repo.Diff.Compare<TreeChanges>(otherCommit.Tree, commit.Tree)) { }
12911291
});
12921292
}
12931293
}

LibGit2Sharp.Tests/DiffWorkdirToIndexFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void ComparingReliesOnProvidedConfigEntriesIfAny()
137137
using (var repo = new Repository(path))
138138
{
139139
SetFilemode(repo, true);
140-
using(var changes = repo.Diff.Compare<TreeChanges>(new[] { file }))
140+
using (var changes = repo.Diff.Compare<TreeChanges>(new[] { file }))
141141
{
142142
Assert.Single(changes);
143143

@@ -150,7 +150,7 @@ public void ComparingReliesOnProvidedConfigEntriesIfAny()
150150
using (var repo = new Repository(path))
151151
{
152152
SetFilemode(repo, false);
153-
using(var changes = repo.Diff.Compare<TreeChanges>(new[] { file }))
153+
using (var changes = repo.Diff.Compare<TreeChanges>(new[] { file }))
154154
{
155155
Assert.Empty(changes);
156156
}

LibGit2Sharp.Tests/FileHistoryFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public void CanTellComplexCommitHistory()
163163
var commit4 = MakeAndCommitChange(repo, repoPath, newPath1, "I have done it again!");
164164

165165
// Perform tests.
166-
var commitFilter = new CommitFilter () { SortBy = CommitSortStrategies.Topological };
166+
var commitFilter = new CommitFilter() { SortBy = CommitSortStrategies.Topological };
167167
var fileHistoryEntries = repo.Commits.QueryBy(newPath1, commitFilter).ToList();
168168
var changedBlobs = fileHistoryEntries.Blobs().Distinct().ToList();
169169

LibGit2Sharp.Tests/MergeFixture.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public void CanFastForwardCommit(bool fromDetachedHead, FastForwardStrategy fast
323323
string path = SandboxMergeTestRepo();
324324
using (var repo = new Repository(path))
325325
{
326-
if(fromDetachedHead)
326+
if (fromDetachedHead)
327327
{
328328
Commands.Checkout(repo, repo.Head.Tip.Id.Sha);
329329
}
@@ -512,7 +512,7 @@ public void CanMergeAndNotCommit()
512512
{
513513
Commit commitToMerge = repo.Branches["normal_merge"].Tip;
514514

515-
MergeResult result = repo.Merge(commitToMerge, Constants.Signature, new MergeOptions() { CommitOnSuccess = false});
515+
MergeResult result = repo.Merge(commitToMerge, Constants.Signature, new MergeOptions() { CommitOnSuccess = false });
516516

517517
Assert.Equal(MergeStatus.NonFastForward, result.Status);
518518
Assert.Null(result.Commit);
@@ -649,7 +649,7 @@ public void CanSpecifyConflictFileStrategy(CheckoutFileConflictStrategy conflict
649649

650650
// Get the blob containing the expected content.
651651
Blob expectedBlob = null;
652-
switch(conflictStrategy)
652+
switch (conflictStrategy)
653653
{
654654
case CheckoutFileConflictStrategy.Theirs:
655655
expectedBlob = repo.Lookup<Blob>(conflict.Theirs.Id);
@@ -731,7 +731,7 @@ public void CanMergeBranch(string branchName, FastForwardStrategy strategy, Merg
731731
string path = SandboxMergeTestRepo();
732732
using (var repo = new Repository(path))
733733
{
734-
Branch branch = repo. Branches[branchName];
734+
Branch branch = repo.Branches[branchName];
735735
MergeResult result = repo.Merge(branch, Constants.Signature, new MergeOptions() { FastForwardStrategy = strategy });
736736

737737
Assert.Equal(expectedMergeStatus, result.Status);
@@ -748,7 +748,7 @@ public void CanMergeIntoOrphanedBranch()
748748
repo.Refs.Add("HEAD", "refs/heads/orphan", true);
749749

750750
// Remove entries from the working directory
751-
foreach(var entry in repo.RetrieveStatus())
751+
foreach (var entry in repo.RetrieveStatus())
752752
{
753753
Commands.Unstage(repo, entry.FilePath);
754754
Commands.Remove(repo, entry.FilePath, true);

LibGit2Sharp.Tests/NoteFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void RetrievingNotesFromAGitObjectWhichHasNoNoteYieldsNoResult()
5656
[Fact]
5757
public void CanRetrieveNotesFromAGitObject()
5858
{
59-
var expectedMessages = new [] { "Just Note, don't you understand?\n", "Nope\n", "Not Nope, Note!\n" };
59+
var expectedMessages = new[] { "Just Note, don't you understand?\n", "Nope\n", "Not Nope, Note!\n" };
6060

6161
string path = SandboxBareTestRepo();
6262
using (var repo = new Repository(path))

LibGit2Sharp.Tests/OdbBackendFixture.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private static Commit AddCommitToRepo(IRepository repo)
2626
var commit = repo.Commit("Initial commit", author, author);
2727

2828
relativeFilepath = "big.txt";
29-
var zeros = new string('0', 32*1024 + 3);
29+
var zeros = new string('0', 32 * 1024 + 3);
3030
Touch(repo.Info.WorkingDirectory, relativeFilepath, zeros);
3131
Commands.Stage(repo, relativeFilepath);
3232

@@ -145,7 +145,7 @@ public void CanEnumerateTheContentOfTheObjectDatabase()
145145

146146
AddCommitToRepo(repo);
147147

148-
var expected = new[]{ "1fe3126", "2b297e6", "6518215", "9daeafb" };
148+
var expected = new[] { "1fe3126", "2b297e6", "6518215", "9daeafb" };
149149

150150
IEnumerable<GitObject> objs = repo.ObjectDatabase;
151151

@@ -296,7 +296,7 @@ public override int Read(ObjectId oid, out UnmanagedMemoryStream data, out Objec
296296

297297
if (!m_objectIdToContent.TryGetValue(oid, out gitObject))
298298
{
299-
return (int) ReturnCode.GIT_ENOTFOUND;
299+
return (int)ReturnCode.GIT_ENOTFOUND;
300300
}
301301

302302
data = Allocate(gitObject.Length);
@@ -411,7 +411,7 @@ public override int ExistsPrefix(string shortSha, out ObjectId found)
411411
if (numFound > 1)
412412
{
413413
found = null;
414-
return (int) ReturnCode.GIT_EAMBIGUOUS;
414+
return (int)ReturnCode.GIT_EAMBIGUOUS;
415415
}
416416
}
417417

0 commit comments

Comments
 (0)