Skip to content

Commit 5dc5968

Browse files
committed
Merge pull request #1097 from whoisj/ocd-cleanup
Applying consistant formatting across the project
2 parents a07186e + 97256e7 commit 5dc5968

File tree

131 files changed

+1044
-1002
lines changed

Some content is hidden

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

131 files changed

+1044
-1002
lines changed

LibGit2Sharp/AmbiguousSpecificationException.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ public class AmbiguousSpecificationException : LibGit2SharpException
1414
/// Initializes a new instance of the <see cref="AmbiguousSpecificationException"/> class.
1515
/// </summary>
1616
public AmbiguousSpecificationException()
17-
{
18-
}
17+
{ }
1918

2019
/// <summary>
2120
/// Initializes a new instance of the <see cref="AmbiguousSpecificationException"/> class with a specified error message.
2221
/// </summary>
2322
/// <param name="message">A message that describes the error.</param>
2423
public AmbiguousSpecificationException(string message)
2524
: base(message)
26-
{
27-
}
25+
{ }
2826

2927
/// <summary>
3028
/// Initializes a new instance of the <see cref="AmbiguousSpecificationException"/> class with a specified error message.
@@ -44,8 +42,7 @@ public AmbiguousSpecificationException(CultureInfo cultureInfo, string format, p
4442
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException"/> parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</param>
4543
public AmbiguousSpecificationException(string message, Exception innerException)
4644
: base(message, innerException)
47-
{
48-
}
45+
{ }
4946

5047
/// <summary>
5148
/// Initializes a new instance of the <see cref="AmbiguousSpecificationException"/> class with a serialized data.
@@ -54,7 +51,6 @@ public AmbiguousSpecificationException(string message, Exception innerException)
5451
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
5552
protected AmbiguousSpecificationException(SerializationInfo info, StreamingContext context)
5653
: base(info, context)
57-
{
58-
}
54+
{ }
5955
}
6056
}

LibGit2Sharp/BareRepositoryException.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ public class BareRepositoryException : LibGit2SharpException
1515
/// Initializes a new instance of the <see cref="LibGit2Sharp.BareRepositoryException"/> class.
1616
/// </summary>
1717
public BareRepositoryException()
18-
{
19-
}
18+
{ }
2019

2120
/// <summary>
2221
/// Initializes a new instance of the <see cref="LibGit2Sharp.BareRepositoryException"/> class with a specified error message.
2322
/// </summary>
2423
/// <param name="message">A message that describes the error.</param>
2524
public BareRepositoryException(string message)
2625
: base(message)
27-
{
28-
}
26+
{ }
2927

3028
/// <summary>
3129
/// Initializes a new instance of the <see cref="LibGit2Sharp.BareRepositoryException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
@@ -34,8 +32,7 @@ public BareRepositoryException(string message)
3432
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException"/> parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</param>
3533
public BareRepositoryException(string message, Exception innerException)
3634
: base(message, innerException)
37-
{
38-
}
35+
{ }
3936

4037
/// <summary>
4138
/// Initializes a new instance of the <see cref="LibGit2Sharp.BareRepositoryException"/> class with a serialized data.
@@ -44,12 +41,10 @@ public BareRepositoryException(string message, Exception innerException)
4441
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
4542
protected BareRepositoryException(SerializationInfo info, StreamingContext context)
4643
: base(info, context)
47-
{
48-
}
44+
{ }
4945

5046
internal BareRepositoryException(string message, GitErrorCode code, GitErrorCategory category)
5147
: base(message, code, category)
52-
{
53-
}
48+
{ }
5449
}
5550
}

LibGit2Sharp/BlameHunk.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ internal BlameHunk(IRepository repository, GitBlameHunk rawHunk)
4040
{
4141
FinalSignature = new Signature(Proxy.git_signature_dup(rawHunk.FinalSignature));
4242
}
43+
4344
if (rawHunk.OrigSignature != IntPtr.Zero)
4445
{
4546
InitialSignature = new Signature(Proxy.git_signature_dup(rawHunk.OrigSignature));
@@ -49,7 +50,8 @@ internal BlameHunk(IRepository repository, GitBlameHunk rawHunk)
4950
/// <summary>
5051
/// For easier mocking
5152
/// </summary>
52-
protected BlameHunk() { }
53+
protected BlameHunk()
54+
{ }
5355

5456
/// <summary>
5557
/// Determine if this hunk contains a given line.

LibGit2Sharp/BlameHunkCollection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ internal BlameHunkCollection(Repository repo, RepositorySafeHandle repoHandle, s
3131
MinLine = (uint)options.MinLine,
3232
MaxLine = (uint)options.MaxLine,
3333
};
34+
3435
if (options.StartingAt != null)
3536
{
3637
rawopts.NewestCommit = repo.Committish(options.StartingAt).Oid;
3738
}
39+
3840
if (options.StoppingAt != null)
3941
{
4042
rawopts.OldestCommit = repo.Committish(options.StoppingAt).Oid;

LibGit2Sharp/Branch.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ protected Branch()
2525
/// <param name="canonicalName">The full name of the reference</param>
2626
internal Branch(Repository repo, Reference reference, string canonicalName)
2727
: this(repo, reference, _ => canonicalName)
28-
{
29-
}
28+
{ }
3029

3130
/// <summary>
3231
/// Initializes a new instance of an orphaned <see cref="Branch"/> class.
@@ -38,8 +37,7 @@ internal Branch(Repository repo, Reference reference, string canonicalName)
3837
/// <param name="reference">The reference.</param>
3938
internal Branch(Repository repo, Reference reference)
4039
: this(repo, reference, r => r.TargetIdentifier)
41-
{
42-
}
40+
{ }
4341

4442
private Branch(Repository repo, Reference reference, Func<Reference, string> canonicalNameSelector)
4543
: base(repo, reference, canonicalNameSelector)
@@ -264,9 +262,9 @@ protected override string Shorten()
264262
return CanonicalName.Substring(Reference.RemoteTrackingBranchPrefix.Length);
265263
}
266264

267-
throw new ArgumentException(
268-
string.Format(CultureInfo.InvariantCulture,
269-
"'{0}' does not look like a valid branch name.", CanonicalName));
265+
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
266+
"'{0}' does not look like a valid branch name.",
267+
CanonicalName));
270268
}
271269
}
272270
}

LibGit2Sharp/BranchCollection.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ private Branch BuildFromReferenceName(string canonicalName)
9292
public virtual IEnumerator<Branch> GetEnumerator()
9393
{
9494
return Proxy.git_branch_iterator(repo, GitBranchType.GIT_BRANCH_ALL)
95-
.ToList().GetEnumerator();
95+
.ToList()
96+
.GetEnumerator();
9697
}
9798

9899
/// <summary>
@@ -154,7 +155,8 @@ public virtual Branch Add(string name, string committish, bool allowOverwrite)
154155
Ensure.ArgumentNotNullOrEmptyString(name, "name");
155156
Ensure.ArgumentNotNullOrEmptyString(committish, "committish");
156157

157-
using (Proxy.git_branch_create_from_annotated(repo.Handle, name, committish, allowOverwrite)) { }
158+
using (Proxy.git_branch_create_from_annotated(repo.Handle, name, committish, allowOverwrite))
159+
{ }
158160

159161
var branch = this[ShortToLocalName(name)];
160162
return branch;
@@ -269,8 +271,7 @@ public virtual Branch Rename(Branch branch, string newName, bool allowOverwrite)
269271
using (ReferenceSafeHandle referencePtr = repo.Refs.RetrieveReferencePtr(Reference.LocalBranchPrefix + branch.FriendlyName))
270272
{
271273
using (Proxy.git_branch_move(referencePtr, newName, allowOverwrite))
272-
{
273-
}
274+
{ }
274275
}
275276

276277
var newBranch = this[newName];
@@ -304,11 +305,7 @@ private static bool LooksLikeABranchName(string referenceName)
304305

305306
private string DebuggerDisplay
306307
{
307-
get
308-
{
309-
return string.Format(CultureInfo.InvariantCulture,
310-
"Count = {0}", this.Count());
311-
}
308+
get { return string.Format(CultureInfo.InvariantCulture, "Count = {0}", this.Count()); }
312309
}
313310
}
314311
}

LibGit2Sharp/BranchUpdater.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ private void GetUpstreamInformation(string canonicalName, out string remoteName,
189189
else
190190
{
191191
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
192-
"'{0}' does not look like a valid canonical branch name.", canonicalName));
192+
"'{0}' does not look like a valid canonical branch name.",
193+
canonicalName));
193194
}
194195
}
195196
}

LibGit2Sharp/CheckoutConflictException.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ public class CheckoutConflictException : LibGit2SharpException
1616
/// Initializes a new instance of the <see cref="LibGit2Sharp.CheckoutConflictException"/> class.
1717
/// </summary>
1818
public CheckoutConflictException()
19-
{
20-
}
19+
{ }
2120

2221
/// <summary>
2322
/// Initializes a new instance of the <see cref="LibGit2Sharp.CheckoutConflictException"/> class with a specified error message.
2423
/// </summary>
2524
/// <param name="message">A message that describes the error.</param>
2625
public CheckoutConflictException(string message)
2726
: base(message)
28-
{
29-
}
27+
{ }
3028

3129
/// <summary>
3230
/// Initializes a new instance of the <see cref="LibGit2Sharp.CheckoutConflictException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
@@ -35,8 +33,7 @@ public CheckoutConflictException(string message)
3533
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException"/> parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</param>
3634
public CheckoutConflictException(string message, Exception innerException)
3735
: base(message, innerException)
38-
{
39-
}
36+
{ }
4037

4138
/// <summary>
4239
/// Initializes a new instance of the <see cref="LibGit2Sharp.CheckoutConflictException"/> class with a serialized data.
@@ -45,12 +42,10 @@ public CheckoutConflictException(string message, Exception innerException)
4542
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
4643
protected CheckoutConflictException(SerializationInfo info, StreamingContext context)
4744
: base(info, context)
48-
{
49-
}
45+
{ }
5046

5147
internal CheckoutConflictException(string message, GitErrorCode code, GitErrorCategory category)
5248
: base(message, code, category)
53-
{
54-
}
49+
{ }
5550
}
5651
}

LibGit2Sharp/CheckoutOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ CheckoutStrategy IConvertableToGitCheckoutOpts.CheckoutStrategy
3434
{
3535
get
3636
{
37-
return CheckoutModifiers.HasFlag(CheckoutModifiers.Force) ?
38-
CheckoutStrategy.GIT_CHECKOUT_FORCE : CheckoutStrategy.GIT_CHECKOUT_SAFE;
37+
return CheckoutModifiers.HasFlag(CheckoutModifiers.Force)
38+
? CheckoutStrategy.GIT_CHECKOUT_FORCE
39+
: CheckoutStrategy.GIT_CHECKOUT_SAFE;
3940
}
4041
}
4142

LibGit2Sharp/CherryPickOptions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public sealed class CherryPickOptions : MergeAndCheckoutOptionsBase
1010
/// By default the cherry pick will be committed if there are no conflicts.
1111
/// </summary>
1212
public CherryPickOptions()
13-
{
14-
}
13+
{ }
1514

1615
/// <summary>
1716
/// When cherry picking a merge commit, the parent number to consider as

LibGit2Sharp/CloneOptions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ CheckoutStrategy IConvertableToGitCheckoutOpts.CheckoutStrategy
5454
{
5555
get
5656
{
57-
return this.Checkout ?
58-
CheckoutStrategy.GIT_CHECKOUT_SAFE :
59-
CheckoutStrategy.GIT_CHECKOUT_NONE;
57+
return this.Checkout
58+
? CheckoutStrategy.GIT_CHECKOUT_SAFE
59+
: CheckoutStrategy.GIT_CHECKOUT_NONE;
6060
}
6161
}
6262

LibGit2Sharp/Commit.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ private string DebuggerDisplay
118118
get
119119
{
120120
return string.Format(CultureInfo.InvariantCulture,
121-
"{0} {1}", Id.ToString(7), MessageShort);
121+
"{0} {1}",
122+
Id.ToString(7),
123+
MessageShort);
122124
}
123125
}
124126

LibGit2Sharp/CommitFilter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ private static IList<object> ToList(object obj)
7373
}
7474

7575
var types = new[]
76-
{
77-
typeof(string), typeof(ObjectId),
78-
typeof(Commit), typeof(TagAnnotation),
79-
typeof(Tag), typeof(Branch), typeof(DetachedHead),
80-
typeof(Reference), typeof(DirectReference), typeof(SymbolicReference)
81-
};
76+
{
77+
typeof(string), typeof(ObjectId),
78+
typeof(Commit), typeof(TagAnnotation),
79+
typeof(Tag), typeof(Branch), typeof(DetachedHead),
80+
typeof(Reference), typeof(DirectReference), typeof(SymbolicReference)
81+
};
8282

8383
if (types.Contains(obj.GetType()))
8484
{

LibGit2Sharp/CommitLog.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public sealed class CommitLog : IQueryableCommitLog
2222
/// <param name="repo">The repository.</param>
2323
internal CommitLog(Repository repo)
2424
: this(repo, new CommitFilter())
25-
{
26-
}
25+
{ }
2726

2827
/// <summary>
2928
/// Initializes a new instance of the <see cref="CommitLog"/> class.
@@ -103,7 +102,7 @@ public IEnumerable<LogEntry> QueryBy(string path, FollowFilter filter)
103102
Ensure.ArgumentNotNull(path, "path");
104103
Ensure.ArgumentNotNull(filter, "filter");
105104

106-
return new FileHistory(repo, path, new CommitFilter {SortBy = filter.SortBy});
105+
return new FileHistory(repo, path, new CommitFilter { SortBy = filter.SortBy });
107106
}
108107

109108
/// <summary>

LibGit2Sharp/CommitRewriteInfo.cs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ public sealed class CommitRewriteInfo
2828
public static CommitRewriteInfo From(Commit commit)
2929
{
3030
return new CommitRewriteInfo
31-
{
32-
Author = commit.Author,
33-
Committer = commit.Committer,
34-
Message = commit.Message
35-
};
31+
{
32+
Author = commit.Author,
33+
Committer = commit.Committer,
34+
Message = commit.Message
35+
};
3636
}
3737

38-
/// <summary>
39-
/// Build a <see cref="CommitRewriteInfo"/> from the <see cref="Commit"/> passed in,
40-
/// optionally overriding some of its properties
41-
/// </summary>
42-
/// <param name="commit">The <see cref="Commit"/> whose information is to be copied</param>
38+
/// <summary>
39+
/// Build a <see cref="CommitRewriteInfo"/> from the <see cref="Commit"/> passed in,
40+
/// optionally overriding some of its properties
41+
/// </summary>
42+
/// <param name="commit">The <see cref="Commit"/> whose information is to be copied</param>
4343
/// <param name="author">Optional override for the author</param>
4444
/// <returns>A new <see cref="CommitRewriteInfo"/> object that matches the info for the
4545
/// <paramref name="commit"/> with the optional parameters replaced..</returns>
@@ -85,10 +85,11 @@ public static CommitRewriteInfo From(Commit commit, Signature author, Signature
8585
/// <param name="message">Optional override for the message</param>
8686
/// <returns>A new <see cref="CommitRewriteInfo"/> object that matches the info for the
8787
/// <paramref name="commit"/> with the optional parameters replaced..</returns>
88-
public static CommitRewriteInfo From(Commit commit,
89-
Signature author,
90-
Signature committer,
91-
string message)
88+
public static CommitRewriteInfo From(
89+
Commit commit,
90+
Signature author,
91+
Signature committer,
92+
string message)
9293
{
9394
var cri = From(commit);
9495
cri.Author = author ?? cri.Author;

0 commit comments

Comments
 (0)