8000 Trim trailing whitespaces · github/libgit2sharp@818654b · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit 818654b

Browse files
committed
Trim trailing whitespaces
1 parent 1e79a42 commit 818654b

39 files changed

+125
-126
lines changed

LibGit2Sharp/CheckoutOptions.cs

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

LibGit2Sharp/Commit.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ private string DebuggerDisplay
118118
get
119119
{
120120
return string.Format(CultureInfo.InvariantCulture,
121-
"{0} {1}",
122-
Id.ToString(7),
121+
"{0} {1}",
122+
Id.ToString(7),
123123
MessageShort);
124124
}
125125
}

LibGit2Sharp/ConflictCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private List<Conflict> AllConflicts()
104104
default:
105105
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture,
106106
"Entry '{0}' bears an unexpected StageLevel '{1}'",
107-
entry.Path,
107+
entry.Path,
108108
entry.StageLevel));
109109
}
110110
}

LibGit2Sharp/ContentChanges.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private string DebuggerDisplay
124124
{
125125
return string.Format(CultureInfo.InvariantCulture,
126126
@"{{+{0}, -{1}}}",
127-
LinesAdded,
127+
LinesAdded,
128128
LinesDeleted);
129129
}
130130
}

LibGit2Sharp/Core/EncodingMarshaler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public virtual IntPtr MarshalManagedToNative(Object managedObj)
4343

4444
if (str == null)
4545
{
46-
throw new MarshalDirectiveException(string.Format(CultureInfo.InvariantCulture,
47-
"{0} must be used on a string.",
46+
throw new MarshalDirectiveException(string.Format(CultureInfo.InvariantCulture,
47+
"{0} must be used on a string.",
4848
GetType().Name));
4949
}
5050

LibGit2Sharp/Core/FilePath.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ private static string Replace(string path, char oldChar, char newChar)
6060

6161
public bool Equals(FilePath other)
6262
{
63-
return other == null
64-
? posix == null
63+
return other == null
64+
? posix == null
6565
: string.Equals(posix, other.posix, StringComparison.Ordinal);
6666
}
6767

LibGit2Sharp/Core/FilePathMarshaler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public override IntPtr MarshalManagedToNative(Object managedObj)
6868

6969
if (null == filePath)
7070
{
71-
throw new MarshalDirectiveException(string.Format(CultureInfo.InvariantCulture,
72-
"{0} must be used on a FilePath.",
71+
throw new MarshalDirectiveException(string.Format(CultureInfo.InvariantCulture,< 6D4E /span>
72+
"{0} must be used on a FilePath.",
7373
GetType().Name));
7474
}
7575

LibGit2Sharp/Core/GitBlame.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public static GitBlameOptionFlags ToGitBlameOptionFlags(this BlameStrategy strat
7979
return GitBlameOptionFlags.GIT_BLAME_NORMAL;
8080

8181
default:
82-
throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture,
83-
"{0} is not supported at this time",
82+
throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture,
83+
"{0} is not supported at this time",
8484
strategy));
8585
}
8686
}

LibGit2Sharp/Core/GitFilter.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ internal class GitFilter
7070
/// callback to free the payload.
7171
/// </summary>
7272
public delegate int git_filter_check_fn(
73-
GitFilter gitFilter,
74-
IntPtr payload,
75-
IntPtr filterSource,
73+
GitFilter gitFilter,
74+
IntPtr payload,
75+
IntPtr filterSource,
7676
IntPtr attributeValues);
7777

7878
/// <summary>
@@ -86,17 +86,17 @@ public delegate int git_filter_check_fn(
8686
/// The `payload` value will refer to any payload that was set by the `check` callback. It may be read from or written to as needed.
8787
/// </summary>
8888
public delegate int git_filter_apply_fn(
89-
GitFilter gitFilter,
90-
IntPtr payload,
91-
IntPtr gitBufTo,
92-
IntPtr gitBufFrom,
89+
GitFilter gitFilter,
90+
IntPtr payload,
91+
IntPtr gitBufTo,
92+
IntPtr gitBufFrom,
9393
IntPtr filterSource);
9494

9595
public delegate int git_filter_stream_fn(
96-
out IntPtr git_writestream_out,
97-
GitFilter self,
98-
IntPtr payload,
99-
IntPtr filterSource,
96+
out IntPtr git_writestream_out,
97+
GitFilter self,
98+
IntPtr payload,
99+
IntPtr filterSource,
100100
IntPtr git_writestream_next);
101101

102102
/// <summary>

LibGit2Sharp/Core/HistoryRewriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ private GitObject RewriteTarget(GitObject oldTarget)
302302
newName = options.TagNameRewriter(annotation.Name, true, annotation.Target.Sha);
303303
}
304304

305-
var newAnnotation = repo.ObjectDatabase.CreateTagAnnotation(newName,
306-
newTarget,
305+
var newAnnotation = repo.ObjectDatabase.CreateTagAnnotation(newName,
306+
newTarget,
307307
annotation.Tagger,
308308
annotation.Message);
309309
objectMap[annotation] = newAnnotation;

LibGit2Sharp/Core/Proxy.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -702,15 +702,15 @@ public static void git_diff_blobs(
702702
using (var osw1 = new ObjectSafeWrapper(oldBlob, repo, true))
703703
using (var osw2 = new ObjectSafeWrapper(newBlob, repo, true))
704704
{
705-
int res = NativeMethods.git_diff_blobs(osw1.ObjectPtr,
706-
null,
707-
osw2.ObjectPtr,
708-
null,
709-
options,
710-
fileCallback,
711-
null,
712-
hunkCallback,
713-
lineCallback,
705+
int res = NativeMethods.git_diff_blobs(osw1.ObjectPtr,
706+
null,
707+
osw2.ObjectPtr,
708+
null,
709+
options,
710+
fileCallback,
711+
null,
712+
hunkCallback,
713+
lineCallback,
714714
IntPtr.Zero);
715715

716716
Ensure.ZeroResult(res);
@@ -2705,8 +2705,8 @@ public static ICollection<TResult> git_stash_foreach<TResult>(
27052705
{
27062706
return git_foreach(resultSelector,
27072707
c => NativeMethods.git_stash_foreach(repo,
2708-
(UIntPtr i, IntPtr m, ref GitOid x, IntPtr p)
2709-
=> c((int)i, m, x, p),
2708+
(UIntPtr i, IntPtr m, ref GitOid x, IntPtr p)
2709+
=> c((int)i, m, x, p),
27102710
IntPtr.Zero),
27112711
GitErrorCode.NotFound);
27122712
}
@@ -2771,7 +2771,7 @@ public static FileStatus git_status_file(RepositorySafeHandle repo, FilePath pat
27712771
case (int)GitErrorCode.Ambiguous:
27722772
throw new AmbiguousSpecificationException(CultureInfo.InvariantCulture,
27732773
"More than one file matches the pathspec '{0}'. " +
2774-
"You can either force a literal path evaluation " +
2774+
"You can either force a literal path evaluation " +
27752775
"(GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH), or use git_status_foreach().",
27762776
path);
27772777

LibGit2Sharp/Core/TarWriter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,9 @@ public static FileNameExtendedHeader Parse(string posixPath, string entrySha)
460460

461461
return new FileNameExtendedHeader(posixPath,
462462
string.Empty,
463-
string.Format(CultureInfo.InvariantCulture,
464-
"{0}.data",
465-
entrySha),
463+
string.Format(CultureInfo.InvariantCulture,
464+
"{0}.data",
465+
entrySha),
466466
true);
467467
}
468468

LibGit2Sharp/Core/Utf8Marshaler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ public static ICustomMarshaler GetInstance(String cookie)
105105

106106
public override IntPtr MarshalManagedToNative(object managedObj)
107107
{
108-
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture,
109-
"{0} cannot be used to pass data to libgit2.",
108+
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture,
109+
"{0} cannot be used to pass data to libgit2.",
110110
GetType().Name));
111111
}
112112

LibGit2Sharp/Filter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace LibGit2Sharp
1010
{
1111
/// <summary>
1212
/// A filter is a way to execute code against a file as it moves to and from the git
13-
/// repository and into the working directory.
13+
/// repository and into the working directory.
1414
/// </summary>
1515
public abstract class Filter : IEquatable<Filter>
1616
{
@@ -87,7 +87,7 @@ internal GitFilter GitFilter
8787

8888
/// <summary>
8989
/// Complete callback on filter
90-
///
90+
///
9191
/// This optional callback will be invoked when the upstream filter is
9292
/// closed. Gives the filter a chance to perform any final actions or
9393
/// necissary clean up.

LibGit2Sharp/FilterRegistration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public sealed class FilterRegistration
1919
public const int FilterPriorityMin = 0;
2020

2121
/// <summary>
22-
///
22+
///
2323
/// </summary>
2424
/// <param name="filter"></param>
2525
/// <param name="priority"></param>

LibGit2Sharp/GitObjectMetadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed class GitObjectMetadata
1010
private readonly GitObjectType type;
1111

1212
/// <summary>
13-
/// Size of the Object
13+
/// Size of the Object
1414
/// </summary>
1515
public long Size { get; private set; }
1616

LibGit2Sharp/GlobalSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public static FilterRegistration RegisterFilter(Filter filter)
200200
/// Registers a <see cref="Filter"/> to be invoked when <see cref="Filter.Name"/> matches .gitattributes 'filter=name'
201201
/// </summary>
202202
/// <param name="filter">The filter to be invoked at run time.</param>
203-
/// <param name="priority">The priroty of the filter to invoked.
203+
/// <param name="priority">The priroty of the filter to invoked.
204204
/// A value of 0 (<see cref="FilterRegistration.FilterPriorityMin"/>) will be run first on checkout and last on checkin.
205205
/// A value of 200 (<see cref="FilterRegistration.FilterPriorityMax"/>) will be run last on checkout and first on checkin.
206206
/// </param>
@@ -222,7 +222,7 @@ public static FilterRegistration RegisterFilter(Filter filter, int priority)
222222

223223
lock (registeredFilters)
224224
{
225-
// if the filter has already been registered
225+
// if the filter has already been registered
226226
if (registeredFilters.ContainsKey(filter))
227227
{
228228
throw new EntryExistsException("The filter has already been registered.", GitErrorCode.Exists, GitErrorCategory.Filter);
@@ -251,7 +251,7 @@ public static void DeregisterFilter(FilterRegistration registration)
251251

252252
// do nothing if the filter isn't registered
253253
if (registeredFilters.ContainsKey(filter))
254-
{
254+
{
255255
// remove the register from the global tracking list
256256
registeredFilters.Remove(filter);
257257
// clean up native allocations

LibGit2Sharp/IndexEntry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ private string DebuggerDisplay
117117
get
118118
{
119119
return string.Format(CultureInfo.InvariantCulture,
120-
"{0} ({1}) => \"{2}\"",
121-
Path,
122-
StageLevel,
120+
"{0} ({1}) => \"{2}\"",
121+
Path,
122+
StageLevel,
123123
Id.ToString(7));
124124
}
125125
}

LibGit2Sharp/IndexNameEntry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ private string DebuggerDisplay
120120
get
121121
{
122122
return string.Format(CultureInfo.InvariantCulture,
123-
"{0} {1} {2}",
124-
Ancestor,
125-
Ours,
123+
"{0} {1} {2}",
124+
Ancestor,
125+
Ours,
126126
Theirs);
127127
}
128128
}

LibGit2Sharp/IndexReucEntry.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ private string DebuggerDisplay
145145
get
146146
{
147147
return string.Format(CultureInfo.InvariantCulture,
148-
"{0}: {1} {2} {3}",
149-
Path,
150-
AncestorId,
151-
OurId,
148+
"{0}: {1} {2} {3}",
149+
Path,
150+
AncestorId,
151+
OurId,
152152
TheirId);
153153
}
154154
}

LibGit2Sharp/Network.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,10 @@ public virtual void Push(
429429
Ensure.ArgumentNotNull(objectish, "objectish");
430430
Ensure.ArgumentNotNullOrEmptyString(destinationSpec, "destinationSpec");
431431

432-
Push(remote,
432+
Push(remote,
433433
string.Format(CultureInfo.InvariantCulture,
434-
"{0}:{1}",
435-
objectish,
434+
"{0}:{1}",
435+
objectish,
436436
destinationSpec));
437437
}
438438

@@ -452,11 +452,11 @@ public virtual void Push(
452452
Ensure.ArgumentNotNull(objectish, "objectish");
453453
Ensure.ArgumentNotNullOrEmptyString(destinationSpec, "destinationSpec");
454454

455-
Push(remote,
455+
Push(remote,
456456
string.Format(CultureInfo.InvariantCulture,
457-
"{0}:{1}",
458-
objectish,
459-
destinationSpec),
457+
"{0}:{1}",
458+
objectish,
459+
destinationSpec),
460460
pushOptions);
461461
}
462462

@@ -570,7 +570,7 @@ internal virtual IEnumerable<FetchHead> FetchHeads
570570
{
571571
int i = 0;
572572

573-
Func<string, string, GitOid, bool, FetchHead> resultSelector =
573+
Func<string, string, GitOid, bool, FetchHead> resultSelector =
574574
(name, url, oid, isMerge) => new FetchHead(repository, name, url, oid, isMerge, i++);
575575

576576
return Proxy.git_repository_fetchhead_foreach(repository.Handle, resultSelector);

LibGit2Sharp/Note.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ private string DebuggerDisplay
115115
{
116116
return string.Format(CultureInfo.InvariantCulture,
117117
"Target \"{0}\", Namespace \"{1}\": {2}",
118-
TargetObjectId.ToString(7),
119-
Namespace,
118+
TargetObjectId.ToString(7),
119+
Namespace,
120120
Message);
121121
}
122122
}

LibGit2Sharp/ObjectDatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ public virtual string ShortenObjectId(GitObject gitObject, int minLength)
489489

490490
if (minLength <= 0 || minLength > ObjectId.HexSize)
491491
{
492-
throw new ArgumentOutOfRangeException("minLength",
492+
throw new ArgumentOutOfRangeException("minLength",
493493
minLength,
494-
string.Format("Expected value should be greater than zero and less than or equal to {0}.",
494+
string.Format("Expected value should be greater than zero and less than or equal to {0}.",
495495
ObjectId.HexSize));
496496
}
497497

LibGit2Sharp/ObjectId.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ private static bool LooksValid(string objectId, bool throwIfInvalid)
297297
return false;
298298
}
299299

300-
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
301-
"'{0}' is not a valid object identifier. Its length should be {1}.",
302-
objectId,
300+
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
301+
"'{0}' is not a valid object identifier. Its length should be {1}.",
302+
objectId,
303303
HexSize),
304304
"objectId");
305305
}

LibGit2Sharp/OdbBackend.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ internal static long ConverToLong(UIntPtr len)
637637
{
638638
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture,
639639
"Provided length ({0}) exceeds long.MaxValue ({1}).",
640-
len.ToUInt64(),
640+
len.ToUInt64(),
641641
long.MaxValue));
642642
}
643643

0 commit comments

Comments
 (0)
0