From 7fa704cbf660e6805bd53a0fbcf5ff8634af20a4 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Fri, 15 Jul 2011 10:16:40 +0200 Subject: [PATCH] Remove trailing white spaces --- BACKLOG.md | 3 +-- CHANGELOG.md | 1 - CI-build.msbuild | 2 +- LICENSE.md | 1 - LibGit2Sharp.Tests/BranchFixture.cs | 4 ++-- LibGit2Sharp.Tests/CommitFixture.cs | 2 +- LibGit2Sharp.Tests/IndexFixture.cs | 6 +++--- LibGit2Sharp.Tests/Properties/AssemblyInfo.cs | 10 +++++----- LibGit2Sharp.Tests/ReferenceFixture.cs | 2 +- LibGit2Sharp.Tests/RepositoryFixture.cs | 2 +- LibGit2Sharp.Tests/TagFixture.cs | 4 ++-- LibGit2Sharp/BranchCollection.cs | 2 +- LibGit2Sharp/CommitCollection.cs | 2 +- LibGit2Sharp/Core/Ensure.cs | 2 +- LibGit2Sharp/Core/GitOid.cs | 2 +- LibGit2Sharp/Core/NativeMethods.cs | 2 +- LibGit2Sharp/Core/PosixPathHelper.cs | 4 ++-- LibGit2Sharp/DirectReference.cs | 2 +- LibGit2Sharp/GitObject.cs | 2 +- LibGit2Sharp/GitObjectType.cs | 12 ++++++------ LibGit2Sharp/Index.cs | 8 ++++---- LibGit2Sharp/ObjectId.cs | 6 +++--- LibGit2Sharp/Properties/AssemblyInfo.cs | 10 +++++----- LibGit2Sharp/ReferenceCollection.cs | 10 +++++----- LibGit2Sharp/Repository.cs | 8 ++++---- 25 files changed, 53 insertions(+), 56 deletions(-) diff --git a/BACKLOG.md b/BACKLOG.md index 2e61b17ed..3cd82a05f 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -29,8 +29,7 @@ - Add Reference equality test suite - Remove Ignore attribute from ReferenceFixture.CanMoveAReferenceToADeeperReferenceHierarchy() once git_reference_rename() is fixed - Remove Ignore attribute from ReferenceFixture.CanMoveAReferenceToAUpperReferenceHierarchy() once git_reference_rename() is fixed - + ### Miscellaneous - Run the build on a Unix platform - diff --git a/CHANGELOG.md b/CHANGELOG.md index 49d5df325..1e41c9373 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,4 +70,3 @@ ## v0.1.0 - Initial release - diff --git a/CI-build.msbuild b/CI-build.msbuild index 24860c7c6..aa9d7b432 100644 --- a/CI-build.msbuild +++ b/CI-build.msbuild @@ -35,7 +35,7 @@ Force32Bit="true" OutputXmlFile="$(DeployFolder)\Test-result.xml" /> - + diff --git a/LICENSE.md b/LICENSE.md index 88461cc31..36d82c3b7 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/LibGit2Sharp.Tests/BranchFixture.cs b/LibGit2Sharp.Tests/BranchFixture.cs index 70b4b7bb5..2d6e7506c 100644 --- a/LibGit2Sharp.Tests/BranchFixture.cs +++ b/LibGit2Sharp.Tests/BranchFixture.cs @@ -328,7 +328,7 @@ public void CanMoveABranchWhileOverwritingAnExistingOne() newTest.Tip.ShouldEqual(br2.Tip); } } - + [Test] public void CreatingABranchTriggersTheCreationOfADirectReference() { @@ -337,7 +337,7 @@ public void CreatingABranchTriggersTheCreationOfADirectReference() { var newBranch = repo.CreateBranch("clone-of-master"); newBranch.IsCurrentRepositoryHead.ShouldBeFalse(); - + var commitId = repo.Head.Tip.Id; newBranch.Tip.Id.ShouldEqual(commitId); diff --git a/LibGit2Sharp.Tests/CommitFixture.cs b/LibGit2Sharp.Tests/CommitFixture.cs index 735032a3f..75da6b09d 100644 --- a/LibGit2Sharp.Tests/CommitFixture.cs +++ b/LibGit2Sharp.Tests/CommitFixture.cs @@ -219,7 +219,7 @@ public void CanEnumerateUsingTwoAbbreviatedShasAsBoundaries() CollectionAssert.AreEquivalent(new[] { "a4a7dce", "c47800c", "9fd738e" }, abbrevShas); } } - + [Test] public void CanLookupCommitGeneric() { diff --git a/LibGit2Sharp.Tests/IndexFixture.cs b/LibGit2Sharp.Tests/IndexFixture.cs index 167537aba..ac9567434 100644 --- a/LibGit2Sharp.Tests/IndexFixture.cs +++ b/LibGit2Sharp.Tests/IndexFixture.cs @@ -16,7 +16,7 @@ public class IndexFixture : BaseFixture "new.txt", "branch_file.txt", "1/branch_file.txt", - //"deleted_staged_file.txt", + //"deleted_staged_file.txt", "deleted_unstaged_file.txt", "modified_staged_file.txt", "modified_unstaged_file.txt", @@ -123,10 +123,10 @@ public void StagingANewVersionOfAFileThenUnstagingRevertsTheBlobToTheVersionOfHe const string fileName = "myFile.txt"; var fullpath = Path.Combine(repo.Info.WorkingDirectory, fileName); - + const string initialContent = "Hello?"; File.AppendAllText(fullpath, initialContent); - + repo.Index.Stage(fileName); var blobId = repo.Index[fileName].Id; diff --git a/LibGit2Sharp.Tests/Properties/AssemblyInfo.cs b/LibGit2Sharp.Tests/Properties/AssemblyInfo.cs index 7f2a77f70..424060a35 100644 --- a/LibGit2Sharp.Tests/Properties/AssemblyInfo.cs +++ b/LibGit2Sharp.Tests/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. @@ -14,8 +14,8 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -27,11 +27,11 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] diff --git a/LibGit2Sharp.Tests/ReferenceFixture.cs b/LibGit2Sharp.Tests/ReferenceFixture.cs index 33f3d9a30..b36234e81 100644 --- a/LibGit2Sharp.Tests/ReferenceFixture.cs +++ b/LibGit2Sharp.Tests/ReferenceFixture.cs @@ -436,7 +436,7 @@ public void CanMoveAndOverWriteAExistingReference() { const string oldName = "refs/heads/packed"; const string newName = "refs/heads/br2"; - + Reference moved = repo.Refs.Move(oldName, newName, true); repo.Refs[oldName].ShouldBeNull(); diff --git a/LibGit2Sharp.Tests/RepositoryFixture.cs b/LibGit2Sharp.Tests/RepositoryFixture.cs index b8764191c..9c27ac0a6 100644 --- a/LibGit2Sharp.Tests/RepositoryFixture.cs +++ b/LibGit2Sharp.Tests/RepositoryFixture.cs @@ -67,7 +67,7 @@ private void CheckGitConfigFile(string dir) private static void AssertIsHidden(string repoPath) { var attribs = File.GetAttributes(repoPath); - + (attribs & FileAttributes.Hidden).ShouldEqual(FileAttributes.Hidden); } diff --git a/LibGit2Sharp.Tests/TagFixture.cs b/LibGit2Sharp.Tests/TagFixture.cs index ad01d8522..bd97b0a6b 100644 --- a/LibGit2Sharp.Tests/TagFixture.cs +++ b/LibGit2Sharp.Tests/TagFixture.cs @@ -375,7 +375,7 @@ public void BlindlyCreatingAnAnnotatedTagOverAnExistingOneThrows() Assert.Throws(() => repo.Tags.Create("e90810b", "refs/heads/br2", signatureNtk, "a nice message")); } } - + [Test] public void CreateTagWithADuplicateNameThrows() { @@ -548,7 +548,7 @@ public void ListAllTagsShouldOutputThemInAnOrderedWay() using (var repo = new Repository(Constants.BareTestRepoPath)) { List tagNames = repo.Tags.Select(t => t.Name).ToList(); - + var sortedTags = expectedTags; sortedTags.Sort(); diff --git a/LibGit2Sharp/BranchCollection.cs b/LibGit2Sharp/BranchCollection.cs index 2d3131f13..578c8c4df 100644 --- a/LibGit2Sharp/BranchCollection.cs +++ b/LibGit2Sharp/BranchCollection.cs @@ -87,7 +87,7 @@ public Branch Create(string name, string target) var reference = repo.Refs[NormalizeToCanonicalName(target)].ResolveToDirectReference(); target = reference.TargetIdentifier; } - + repo.Refs.Create(NormalizeToCanonicalName(name), target); return this[name]; } diff --git a/LibGit2Sharp/CommitCollection.cs b/LibGit2Sharp/CommitCollection.cs index 480a2cc02..d0301552d 100644 --- a/LibGit2Sharp/CommitCollection.cs +++ b/LibGit2Sharp/CommitCollection.cs @@ -86,7 +86,7 @@ public ICommitCollection QueryBy(Filter filter) return new CommitCollection(repo, filter.SortBy) { - includedIdentifier = filter.Since, + includedIdentifier = filter.Since, excludedIdentifier = filter.Until }; } diff --git a/LibGit2Sharp/Core/Ensure.cs b/LibGit2Sharp/Core/Ensure.cs index 00585da03..1eb942ed0 100644 --- a/LibGit2Sharp/Core/Ensure.cs +++ b/LibGit2Sharp/Core/Ensure.cs @@ -46,7 +46,7 @@ public static void ArgumentNotNullOrEmptyString(string argumentValue, string arg /// /// /// The result to examine. - /// False to only allow success when comparing against 0, + /// False to only allow success when comparing against 0, /// True when positive values are allowed as well. public static void Success(int result, bool allowPositiveResult = false) { diff --git a/LibGit2Sharp/Core/GitOid.cs b/LibGit2Sharp/Core/GitOid.cs index 3202c22c9..ab25b5821 100644 --- a/LibGit2Sharp/Core/GitOid.cs +++ b/LibGit2Sharp/Core/GitOid.cs @@ -10,7 +10,7 @@ internal struct GitOid /// /// The raw binary 20 byte Id. /// - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] public byte[] Id; } } \ No newline at end of file diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs index 9c6277304..1ecd08517 100644 --- a/LibGit2Sharp/Core/NativeMethods.cs +++ b/LibGit2Sharp/Core/NativeMethods.cs @@ -133,7 +133,7 @@ internal static class NativeMethods public static extern int git_repository_discover(StringBuilder repository_path, int size, string start_path, [MarshalAs(UnmanagedType.Bool)] bool across_fs, string ceiling_dirs); - + [DllImport(libgit2)] public static extern void git_repository_free(IntPtr repository); diff --git a/LibGit2Sharp/Core/PosixPathHelper.cs b/LibGit2Sharp/Core/PosixPathHelper.cs index 9ea88aa39..88cb2ce1e 100644 --- a/LibGit2Sharp/Core/PosixPathHelper.cs +++ b/LibGit2Sharp/Core/PosixPathHelper.cs @@ -11,8 +11,8 @@ public static string ToPosix(string nativePath) if (posixDirectorySeparatorChar == Path.DirectorySeparatorChar) { return nativePath; - } - + } + if (nativePath == null) { return null; diff --git a/LibGit2Sharp/DirectReference.cs b/LibGit2Sharp/DirectReference.cs index 7a3feb9a7..0841ed6ba 100644 --- a/LibGit2Sharp/DirectReference.cs +++ b/LibGit2Sharp/DirectReference.cs @@ -10,7 +10,7 @@ public class DirectReference : Reference private readonly Func targetResolver; private bool resolved; private GitObject target; - + internal DirectReference(Func targetResolver) { this.targetResolver = targetResolver; diff --git a/LibGit2Sharp/GitObject.cs b/LibGit2Sharp/GitObject.cs index 2ed16916b..a2f0d26f3 100644 --- a/LibGit2Sharp/GitObject.cs +++ b/LibGit2Sharp/GitObject.cs @@ -84,7 +84,7 @@ public override bool Equals(object obj) { return Equals(obj as GitObject); } - + /// /// Determines whether the specified is equal to the current . /// diff --git a/LibGit2Sharp/GitObjectType.cs b/LibGit2Sharp/GitObjectType.cs index b73187b91..7654b4a7f 100644 --- a/LibGit2Sharp/GitObjectType.cs +++ b/LibGit2Sharp/GitObjectType.cs @@ -11,7 +11,7 @@ public enum GitObjectType Any = -2, /// - /// Object is invalid. + /// Object is invalid. /// Bad = -1, @@ -24,27 +24,27 @@ public enum GitObjectType /// A commit object. /// Commit = 1, - + /// /// A tree (directory listing) object. /// Tree = 2, - + /// /// A file revision object. /// Blob = 3, - + /// /// An annotated tag object. /// Tag = 4, - + /// /// Reserved for future use. /// Ext2 = 5, - + /// /// A delta, base is given by an offset. /// diff --git a/LibGit2Sharp/Index.cs b/LibGit2Sharp/Index.cs index bd037b80a..87cece647 100644 --- a/LibGit2Sharp/Index.cs +++ b/LibGit2Sharp/Index.cs @@ -23,7 +23,7 @@ internal IndexSafeHandle Handle { get { return handle; } } - + public int Count { get { return (int)NativeMethods.git_index_entrycount(handle); } @@ -162,7 +162,7 @@ public void Move(string sourcePath, string destinationPath) RemoveFromIndex(relativeSourcePath); File.Move(Path.Combine(wd, relativeSourcePath), Path.Combine(wd, relativeDestinationPath)); - + AddToIndex(relativeDestinationPath); UpdatePhysicalIndex(); @@ -190,7 +190,7 @@ private void RestorePotentialPreviousVersionOf(string relativePath) { return; } - + File.WriteAllBytes(Path.Combine(repo.Info.WorkingDirectory, relativePath), ((Blob) currentHeadBlob.Target).Content); AddToIndex(relativePath); } @@ -201,7 +201,7 @@ private void UpdatePhysicalIndex() Ensure.Success(res); } - private string BuildRelativePathFrom(string path) //TODO: To be removed when libgit2 natively implements this + private string BuildRelativePathFrom(string path) //TODO: To be removed when libgit2 natively implements this { if (!Path.IsPathRooted(path)) { diff --git a/LibGit2Sharp/ObjectId.cs b/LibGit2Sharp/ObjectId.cs index 8dc4f857e..1e8679325 100644 --- a/LibGit2Sharp/ObjectId.cs +++ b/LibGit2Sharp/ObjectId.cs @@ -283,9 +283,9 @@ private static bool LooksValid(string objectId, bool throwIfInvalid, bool allowS return false; } - string additionalErrorInformation = - !allowShortIdentifier ? - string.Format("Its length should be {0}", HexSize) : + string additionalErrorInformation = + !allowShortIdentifier ? + string.Format("Its length should be {0}", HexSize) : string.Format("Its length should be comprised between {0} and {1}", MinHexSize, HexSize); throw new ArgumentException( diff --git a/LibGit2Sharp/Properties/AssemblyInfo.cs b/LibGit2Sharp/Properties/AssemblyInfo.cs index b05604f5d..64d7e2196 100644 --- a/LibGit2Sharp/Properties/AssemblyInfo.cs +++ b/LibGit2Sharp/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. @@ -21,8 +21,8 @@ [assembly: CLSCompliant(true)] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -34,11 +34,11 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] diff --git a/LibGit2Sharp/ReferenceCollection.cs b/LibGit2Sharp/ReferenceCollection.cs index 0acc2d6dc..87b7988dd 100644 --- a/LibGit2Sharp/ReferenceCollection.cs +++ b/LibGit2Sharp/ReferenceCollection.cs @@ -71,7 +71,7 @@ public Reference Create(string name, string target, bool allowOverwrite = false) Ensure.ArgumentNotNullOrEmptyString(target, "target"); ObjectId id; - + IntPtr reference; int res; @@ -97,9 +97,9 @@ private int CreateSymbolicReference(string name, string target, bool allowOverwr private int CreateDirectReference(string name, ObjectId targetId, bool allowOverwrite, out IntPtr reference) { targetId = Unabbreviate(targetId); - + GitOid oid = targetId.Oid; - + return NativeMethods.git_reference_create_oid(out reference, repo.Handle, name, ref oid, allowOverwrite); } @@ -111,7 +111,7 @@ private ObjectId Unabbreviate(ObjectId targetId) } var obj = repo.Lookup(targetId); - + if (obj == null) { Ensure.Success((int) GitErrorCode.GIT_ENOTFOUND); @@ -147,7 +147,7 @@ public Reference Move(string currentName, string newName, bool allowOverwrite = Ensure.ArgumentNotNullOrEmptyString(newName, "newName"); IntPtr referencePtr = RetrieveReferencePtr(currentName); - + int res = NativeMethods.git_reference_rename(referencePtr, newName, allowOverwrite); Ensure.Success(res); diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs index 7658390e7..da1111d29 100644 --- a/LibGit2Sharp/Repository.cs +++ b/LibGit2Sharp/Repository.cs @@ -59,7 +59,7 @@ public Branch Head get { Reference headRef = Refs["HEAD"]; - + if (Info.IsEmpty) { return new Branch(headRef.TargetIdentifier, null, this); @@ -86,7 +86,7 @@ public ReferenceCollection Refs } /// - /// Lookup and enumerate commits in the repository. + /// Lookup and enumerate commits in the repository. /// Iterating this collection directly starts walking from the HEAD. /// public IQueryableCommitCollection Commits @@ -146,7 +146,7 @@ protected virtual void Dispose(bool disposing) /// /// Tells if the specified sha exists in the repository. - /// + /// /// Exceptions: /// ArgumentException /// ArgumentNullException @@ -263,7 +263,7 @@ private static bool IsReferencePeelable(Reference reference) /// /// Probe for a git repository. - /// The lookup start from and walk upward parent directories if nothing has been found. + /// The lookup start from and walk upward parent directories if nothing has been found. /// /// The base path where the lookup starts. /// The path to the git repository.