From 5b9cd9914d5ac3f394358d79184088562d371f52 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Mon, 15 Jun 2015 15:11:24 +0200 Subject: [PATCH 1/3] Fix some Xml doc related warnings --- LibGit2Sharp/TreeEntryChanges.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LibGit2Sharp/TreeEntryChanges.cs b/LibGit2Sharp/TreeEntryChanges.cs index bb288d265..0984ccf6f 100644 --- a/LibGit2Sharp/TreeEntryChanges.cs +++ b/LibGit2Sharp/TreeEntryChanges.cs @@ -55,7 +55,7 @@ internal TreeEntryChanges(GitDiffDelta delta) /// be false during a conflict that deletes both the /// "ours" and "theirs" sides, or when the diff is a /// delete and the status is - /// . + /// . /// public virtual bool Exists { get; private set; } @@ -85,7 +85,7 @@ internal TreeEntryChanges(GitDiffDelta delta) /// side to a conflict. This will be false during a /// conflict that involves both the "ours" and "theirs" /// side being added, or when the diff is an add and the - /// status is . + /// status is . /// public virtual bool OldExists { get; private set; } From 61ea7e26b8e9d89707898b37e2180f93baa96c4c Mon Sep 17 00:00:00 2001 From: nulltoken Date: Mon, 15 Jun 2015 15:13:21 +0200 Subject: [PATCH 2/3] Drop trailing spaces --- LibGit2Sharp.Tests/SetErrorFixture.cs | 2 +- LibGit2Sharp/Core/GitFilter.cs | 28 +++++++++++++-------------- LibGit2Sharp/GlobalSettings.cs | 2 +- LibGit2Sharp/PushOptions.cs | 2 +- LibGit2Sharp/StashApplyOptions.cs | 2 +- LibGit2Sharp/TreeEntryChanges.cs | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/LibGit2Sharp.Tests/SetErrorFixture.cs b/LibGit2Sharp.Tests/SetErrorFixture.cs index 62bdeab86..b10a54108 100644 --- a/LibGit2Sharp.Tests/SetErrorFixture.cs +++ b/LibGit2Sharp.Tests/SetErrorFixture.cs @@ -42,7 +42,7 @@ public void FormatExceptionWithInnerException() AssertExpectedExceptionMessage(expectedMessage, exceptionToThrow); } - + [Fact] public void FormatAggregateException() { diff --git a/LibGit2Sharp/Core/GitFilter.cs b/LibGit2Sharp/Core/GitFilter.cs index eeb234be5..05f58c6b8 100644 --- a/LibGit2Sharp/Core/GitFilter.cs +++ b/LibGit2Sharp/Core/GitFilter.cs @@ -34,10 +34,10 @@ internal class GitFilter /// /// Initialize callback on filter - /// + /// /// Specified as `filter.initialize`, this is an optional callback invoked /// before a filter is first used. It will be called once at most. - /// + /// /// If non-NULL, the filter's `initialize` callback will be invoked right /// before the first use of the filter, so you can defer expensive /// initialization operations (in case libgit2 is being used in a way that doesn't need the filter). @@ -46,7 +46,7 @@ internal class GitFilter /// /// Shutdown callback on filter - /// + /// /// Specified as `filter.shutdown`, this is an optional callback invoked /// when the filter is unregistered or when libgit2 is shutting down. It /// will be called once at most and should release resources as needed. @@ -57,15 +57,15 @@ internal class GitFilter /// /// Callback to decide if a given source needs this filter /// Specified as `filter.check`, this is an optional callback that checks if filtering is needed for a given source. - /// - /// It should return 0 if the filter should be applied (i.e. success), GIT_PASSTHROUGH if the filter should + /// + /// It should return 0 if the filter should be applied (i.e. success), GIT_PASSTHROUGH if the filter should /// not be applied, or an error code to fail out of the filter processing pipeline and return to the caller. - /// + /// /// The `attr_values` will be set to the values of any attributes given in the filter definition. See `git_filter` below for more detail. - /// - /// The `payload` will be a pointer to a reference payload for the filter. This will start as NULL, but `check` can assign to this + /// + /// The `payload` will be a pointer to a reference payload for the filter. This will start as NULL, but `check` can assign to this /// pointer for later use by the `apply` callback. Note that the value should be heap allocated (not stack), so that it doesn't go - /// away before the `apply` callback can use it. If a filter allocates and assigns a value to the `payload`, it will need a `cleanup` + /// away before the `apply` callback can use it. If a filter allocates and assigns a value to the `payload`, it will need a `cleanup` /// callback to free the payload. /// public delegate int git_filter_check_fn( @@ -73,12 +73,12 @@ public delegate int git_filter_check_fn( /// /// Callback to actually perform the data filtering - /// - /// Specified as `filter.apply`, this is the callback that actually filters data. + /// + /// Specified as `filter.apply`, this is the callback that actually filters data. /// If it successfully writes the output, it should return 0. Like `check`, - /// it can return GIT_PASSTHROUGH to indicate that the filter doesn't want to run. + /// it can return GIT_PASSTHROUGH to indicate that the filter doesn't want to run. /// Other error codes will stop filter processing and return to the caller. - /// + /// /// 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. /// public delegate int git_filter_apply_fn( @@ -89,7 +89,7 @@ public delegate int git_filter_stream_fn( /// /// Callback to clean up after filtering has been applied. Specified as `filter.cleanup`, this is an optional callback invoked - /// after the filter has been applied. If the `check` or `apply` callbacks allocated a `payload` + /// after the filter has been applied. If the `check` or `apply` callbacks allocated a `payload` /// to keep per-source filter state, use this callback to free that payload and release resources as required. /// public delegate void git_filter_cleanup_fn(IntPtr gitFilter, IntPtr payload); diff --git a/LibGit2Sharp/GlobalSettings.cs b/LibGit2Sharp/GlobalSettings.cs index d3eca3aea..d312b3a43 100644 --- a/LibGit2Sharp/GlobalSettings.cs +++ b/LibGit2Sharp/GlobalSettings.cs @@ -171,7 +171,7 @@ internal static string GetAndLockNativeLibraryPath() } /// - /// Register a filter globally with a default priority of 200 allowing the custom filter + /// Register a filter globally with a default priority of 200 allowing the custom filter /// to imitate a core Git filter driver. It will be run last on checkout and first on checkin. /// public static FilterRegistration RegisterFilter(Filter filter) diff --git a/LibGit2Sharp/PushOptions.cs b/LibGit2Sharp/PushOptions.cs index f4874643e..10eac1392 100644 --- a/LibGit2Sharp/PushOptions.cs +++ b/LibGit2Sharp/PushOptions.cs @@ -41,7 +41,7 @@ public sealed class PushOptions public PackBuilderProgressHandler OnPackBuilderProgress { get; set; } /// - /// Called once between the negotiation step and the upload. It provides + /// Called once between the negotiation step and the upload. It provides /// information about what updates will be performed. /// public PrePushHandler OnNegotiationCompletedBeforePush { get; set; } diff --git a/LibGit2Sharp/StashApplyOptions.cs b/LibGit2Sharp/StashApplyOptions.cs index 0af54829d..092d068e1 100644 --- a/LibGit2Sharp/StashApplyOptions.cs +++ b/LibGit2Sharp/StashApplyOptions.cs @@ -10,7 +10,7 @@ namespace LibGit2Sharp public sealed class StashApplyOptions { /// - /// for controlling checkout index reinstating./> + /// for controlling checkout index reinstating./> /// /// The flags. public StashApplyModifiers ApplyModifiers { get; set; } diff --git a/LibGit2Sharp/TreeEntryChanges.cs b/LibGit2Sharp/TreeEntryChanges.cs index 0984ccf6f..e731de79d 100644 --- a/LibGit2Sharp/TreeEntryChanges.cs +++ b/LibGit2Sharp/TreeEntryChanges.cs @@ -79,7 +79,7 @@ internal TreeEntryChanges(GitDiffDelta delta) /// public virtual ObjectId OldOid { get; private set; } - /// + /// /// The file exists in the old side of the diff. /// This is useful in determining if you have an ancestor /// side to a conflict. This will be false during a From ba91a272fecd71ddd42b27788f1879403edf772c Mon Sep 17 00:00:00 2001 From: nulltoken Date: Mon, 15 Jun 2015 15:30:40 +0200 Subject: [PATCH 3/3] Cleanup imports --- LibGit2Sharp.Tests/FilterFixture.cs | 4 ++-- LibGit2Sharp.Tests/TestHelpers/Constants.cs | 5 +++-- LibGit2Sharp.Tests/TestHelpers/TestRemoteRefs.cs | 2 -- LibGit2Sharp/CherryPickOptions.cs | 5 +---- LibGit2Sharp/Core/GitFilter.cs | 1 + LibGit2Sharp/Core/NativeMethods.cs | 1 - LibGit2Sharp/Handlers.cs | 3 +-- LibGit2Sharp/MergeAndCheckoutOptionsBase.cs | 1 - LibGit2Sharp/MergeConflictException.cs | 3 --- LibGit2Sharp/MergeOptions.cs | 2 -- LibGit2Sharp/MergeTreeOptions.cs | 6 +----- LibGit2Sharp/MergeTreeResult.cs | 4 +--- LibGit2Sharp/PushUpdate.cs | 1 - LibGit2Sharp/RecurseSubmodulesException.cs | 1 - LibGit2Sharp/RemoteUpdater.cs | 1 - LibGit2Sharp/RepositoryOperationContext.cs | 7 +------ LibGit2Sharp/RevertOptions.cs | 5 +---- LibGit2Sharp/SecureUsernamePasswordCredentials.cs | 4 ++-- LibGit2Sharp/StashApplyOptions.cs | 1 - LibGit2Sharp/StashApplyProgress.cs | 4 +--- LibGit2Sharp/StashApplyStatus.cs | 4 +--- 21 files changed, 16 insertions(+), 49 deletions(-) diff --git a/LibGit2Sharp.Tests/FilterFixture.cs b/LibGit2Sharp.Tests/FilterFixture.cs index b0480256a..10461d8c9 100644 --- a/LibGit2Sharp.Tests/FilterFixture.cs +++ b/LibGit2Sharp.Tests/FilterFixture.cs @@ -238,11 +238,11 @@ public void CanFilterLargeFiles() private unsafe bool CharArrayAreEqual(char[] array1, char[] array2, int count) { - if (Object.ReferenceEquals(array1, array2)) + if (ReferenceEquals(array1, array2)) { return true; } - if (Object.ReferenceEquals(array1, null) || Object.ReferenceEquals(null, array2)) + if (ReferenceEquals(array1, null) || ReferenceEquals(null, array2)) { return false; } diff --git a/LibGit2Sharp.Tests/TestHelpers/Constants.cs b/LibGit2Sharp.Tests/TestHelpers/Constants.cs index 85f95c0fc..d3734207e 100644 --- a/LibGit2Sharp.Tests/TestHelpers/Constants.cs +++ b/LibGit2Sharp.Tests/TestHelpers/Constants.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.IO; using System.Reflection; +using System.Security; using LibGit2Sharp.Core; namespace LibGit2Sharp.Tests.TestHelpers @@ -90,11 +91,11 @@ private static string UnwrapUnixTempPath() } // To help with creating secure strings to test with. - private static System.Security.SecureString StringToSecureString(string str) + private static SecureString StringToSecureString(string str) { var chars = str.ToCharArray(); - var secure = new System.Security.SecureString(); + var secure = new SecureString(); for (var i = 0; i < chars.Length; i++) { secure.AppendChar(chars[i]); diff --git a/LibGit2Sharp.Tests/TestHelpers/TestRemoteRefs.cs b/LibGit2Sharp.Tests/TestHelpers/TestRemoteRefs.cs index aafdd5f34..a3e1e58c4 100644 --- a/LibGit2Sharp.Tests/TestHelpers/TestRemoteRefs.cs +++ b/LibGit2Sharp.Tests/TestHelpers/TestRemoteRefs.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; namespace LibGit2Sharp.Tests.TestHelpers { diff --git a/LibGit2Sharp/CherryPickOptions.cs b/LibGit2Sharp/CherryPickOptions.cs index 8257fdb50..14aa04185 100644 --- a/LibGit2Sharp/CherryPickOptions.cs +++ b/LibGit2Sharp/CherryPickOptions.cs @@ -1,7 +1,4 @@ -using LibGit2Sharp.Core; -using LibGit2Sharp.Handlers; - -namespace LibGit2Sharp +namespace LibGit2Sharp { /// /// Options controlling CherryPick behavior. diff --git a/LibGit2Sharp/Core/GitFilter.cs b/LibGit2Sharp/Core/GitFilter.cs index 05f58c6b8..1b177a8ec 100644 --- a/LibGit2Sharp/Core/GitFilter.cs +++ b/LibGit2Sharp/Core/GitFilter.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; + namespace LibGit2Sharp.Core { /// diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs index b01976ddd..125822a4c 100644 --- a/LibGit2Sharp/Core/NativeMethods.cs +++ b/LibGit2Sharp/Core/NativeMethods.cs @@ -1,7 +1,6 @@ using System; using System.Globalization; using System.IO; -using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; diff --git a/LibGit2Sharp/Handlers.cs b/LibGit2Sharp/Handlers.cs index 55a4d96ed..a64b21cb5 100644 --- a/LibGit2Sharp/Handlers.cs +++ b/LibGit2Sharp/Handlers.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace LibGit2Sharp.Handlers { diff --git a/LibGit2Sharp/MergeAndCheckoutOptionsBase.cs b/LibGit2Sharp/MergeAndCheckoutOptionsBase.cs index e9240e555..b0d7cfc1d 100644 --- a/LibGit2Sharp/MergeAndCheckoutOptionsBase.cs +++ b/LibGit2Sharp/MergeAndCheckoutOptionsBase.cs @@ -1,6 +1,5 @@ using LibGit2Sharp.Core; using LibGit2Sharp.Handlers; -using System; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/MergeConflictException.cs b/LibGit2Sharp/MergeConflictException.cs index edcd5ebb7..0d8689195 100644 --- a/LibGit2Sharp/MergeConflictException.cs +++ b/LibGit2Sharp/MergeConflictException.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/MergeOptions.cs b/LibGit2Sharp/MergeOptions.cs index ccdbff3e7..535d9a919 100644 --- a/LibGit2Sharp/MergeOptions.cs +++ b/LibGit2Sharp/MergeOptions.cs @@ -1,6 +1,4 @@ using System; -using LibGit2Sharp.Core; -using LibGit2Sharp.Handlers; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/MergeTreeOptions.cs b/LibGit2Sharp/MergeTreeOptions.cs index cf580d6f0..910ec95f7 100644 --- a/LibGit2Sharp/MergeTreeOptions.cs +++ b/LibGit2Sharp/MergeTreeOptions.cs @@ -1,8 +1,4 @@ -using LibGit2Sharp.Core; -using LibGit2Sharp.Handlers; -using System; - -namespace LibGit2Sharp +namespace LibGit2Sharp { /// /// Options controlling the behavior of two trees being merged. diff --git a/LibGit2Sharp/MergeTreeResult.cs b/LibGit2Sharp/MergeTreeResult.cs index 50c305f39..2f54d9565 100644 --- a/LibGit2Sharp/MergeTreeResult.cs +++ b/LibGit2Sharp/MergeTreeResult.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using LibGit2Sharp.Core; +using System.Collections.Generic; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/PushUpdate.cs b/LibGit2Sharp/PushUpdate.cs index d948408c9..8e7ac5ccd 100644 --- a/LibGit2Sharp/PushUpdate.cs +++ b/LibGit2Sharp/PushUpdate.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.InteropServices; using LibGit2Sharp.Core; namespace LibGit2Sharp diff --git a/LibGit2Sharp/RecurseSubmodulesException.cs b/LibGit2Sharp/RecurseSubmodulesException.cs index e643df648..586261ddb 100644 --- a/LibGit2Sharp/RecurseSubmodulesException.cs +++ b/LibGit2Sharp/RecurseSubmodulesException.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.Serialization; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/RemoteUpdater.cs b/LibGit2Sharp/RemoteUpdater.cs index 07c823bcc..07ef39dbd 100644 --- a/LibGit2Sharp/RemoteUpdater.cs +++ b/LibGit2Sharp/RemoteUpdater.cs @@ -1,7 +1,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; using LibGit2Sharp.Core; using LibGit2Sharp.Core.Handles; diff --git a/LibGit2Sharp/RepositoryOperationContext.cs b/LibGit2Sharp/RepositoryOperationContext.cs index 466deb4cb..4eb043301 100644 --- a/LibGit2Sharp/RepositoryOperationContext.cs +++ b/LibGit2Sharp/RepositoryOperationContext.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace LibGit2Sharp +namespace LibGit2Sharp { /// /// Class to convey information about the repository that is being operated on diff --git a/LibGit2Sharp/RevertOptions.cs b/LibGit2Sharp/RevertOptions.cs index 04e43e44f..c57794f01 100644 --- a/LibGit2Sharp/RevertOptions.cs +++ b/LibGit2Sharp/RevertOptions.cs @@ -1,7 +1,4 @@ -using LibGit2Sharp.Core; -using LibGit2Sharp.Handlers; - -namespace LibGit2Sharp +namespace LibGit2Sharp { /// /// Options controlling Revert behavior. diff --git a/LibGit2Sharp/SecureUsernamePasswordCredentials.cs b/LibGit2Sharp/SecureUsernamePasswordCredentials.cs index 5e1d49314..16427ddf3 100644 --- a/LibGit2Sharp/SecureUsernamePasswordCredentials.cs +++ b/LibGit2Sharp/SecureUsernamePasswordCredentials.cs @@ -1,7 +1,7 @@ using System; -using LibGit2Sharp.Core; -using System.Security; using System.Runtime.InteropServices; +using System.Security; +using LibGit2Sharp.Core; namespace LibGit2Sharp { diff --git a/LibGit2Sharp/StashApplyOptions.cs b/LibGit2Sharp/StashApplyOptions.cs index 092d068e1..624546f90 100644 --- a/LibGit2Sharp/StashApplyOptions.cs +++ b/LibGit2Sharp/StashApplyOptions.cs @@ -1,5 +1,4 @@ using System; -using LibGit2Sharp.Core; using LibGit2Sharp.Handlers; namespace LibGit2Sharp diff --git a/LibGit2Sharp/StashApplyProgress.cs b/LibGit2Sharp/StashApplyProgress.cs index c96839769..329e88741 100644 --- a/LibGit2Sharp/StashApplyProgress.cs +++ b/LibGit2Sharp/StashApplyProgress.cs @@ -1,6 +1,4 @@ -using System; - -namespace LibGit2Sharp +namespace LibGit2Sharp { /// /// The current progress of the stash application. diff --git a/LibGit2Sharp/StashApplyStatus.cs b/LibGit2Sharp/StashApplyStatus.cs index 25ab991a4..4a0ce8829 100644 --- a/LibGit2Sharp/StashApplyStatus.cs +++ b/LibGit2Sharp/StashApplyStatus.cs @@ -1,6 +1,4 @@ -using System; - -namespace LibGit2Sharp +namespace LibGit2Sharp { /// /// The result of a stash application operation.