зеркало из https://github.com/github/libgit2sharp.git
Remove trailing white spaces
This commit is contained in:
Родитель
66cbcc0f2b
Коммит
7fa704cbf6
|
@ -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
|
||||
|
||||
|
|
|
@ -70,4 +70,3 @@
|
|||
## v0.1.0
|
||||
|
||||
- Initial release
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
Force32Bit="true"
|
||||
OutputXmlFile="$(DeployFolder)\Test-result.xml" />
|
||||
</Target>
|
||||
|
||||
|
||||
<Target Name="Deploy" DependsOnTargets="Test">
|
||||
<Copy SourceFiles="@(OutputFiles)"
|
||||
DestinationFiles="@(OutputFiles->'$(DeployFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ namespace LibGit2Sharp.Tests
|
|||
newTest.Tip.ShouldEqual(br2.Tip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void CreatingABranchTriggersTheCreationOfADirectReference()
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ namespace LibGit2Sharp.Tests
|
|||
{
|
||||
var newBranch = repo.CreateBranch("clone-of-master");
|
||||
newBranch.IsCurrentRepositoryHead.ShouldBeFalse();
|
||||
|
||||
|
||||
var commitId = repo.Head.Tip.Id;
|
||||
newBranch.Tip.Id.ShouldEqual(commitId);
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ namespace LibGit2Sharp.Tests
|
|||
CollectionAssert.AreEquivalent(new[] { "a4a7dce", "c47800c", "9fd738e" }, abbrevShas);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void CanLookupCommitGeneric()
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace LibGit2Sharp.Tests
|
|||
"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 @@ namespace LibGit2Sharp.Tests
|
|||
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;
|
||||
|
||||
|
|
|
@ -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 @@ using System.Runtime.InteropServices;
|
|||
[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 @@ using System.Runtime.InteropServices;
|
|||
// 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.*")]
|
||||
|
||||
|
|
|
@ -436,7 +436,7 @@ namespace LibGit2Sharp.Tests
|
|||
{
|
||||
const string oldName = "refs/heads/packed";
|
||||
const string newName = "refs/heads/br2";
|
||||
|
||||
|
||||
Reference moved = repo.Refs.Move(oldName, newName, true);
|
||||
|
||||
repo.Refs[oldName].ShouldBeNull();
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace LibGit2Sharp.Tests
|
|||
private static void AssertIsHidden(string repoPath)
|
||||
{
|
||||
var attribs = File.GetAttributes(repoPath);
|
||||
|
||||
|
||||
(attribs & FileAttributes.Hidden).ShouldEqual(FileAttributes.Hidden);
|
||||
}
|
||||
|
||||
|
|
|
@ -375,7 +375,7 @@ namespace LibGit2Sharp.Tests
|
|||
Assert.Throws<ApplicationException>(() => repo.Tags.Create("e90810b", "refs/heads/br2", signatureNtk, "a nice message"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void CreateTagWithADuplicateNameThrows()
|
||||
{
|
||||
|
@ -548,7 +548,7 @@ namespace LibGit2Sharp.Tests
|
|||
using (var repo = new Repository(Constants.BareTestRepoPath))
|
||||
{
|
||||
List<string> tagNames = repo.Tags.Select(t => t.Name).ToList();
|
||||
|
||||
|
||||
var sortedTags = expectedTags;
|
||||
sortedTags.Sort();
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace LibGit2Sharp
|
|||
var reference = repo.Refs[NormalizeToCanonicalName(target)].ResolveToDirectReference();
|
||||
target = reference.TargetIdentifier;
|
||||
}
|
||||
|
||||
|
||||
repo.Refs.Create(NormalizeToCanonicalName(name), target);
|
||||
return this[name];
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace LibGit2Sharp
|
|||
|
||||
return new CommitCollection(repo, filter.SortBy)
|
||||
{
|
||||
includedIdentifier = filter.Since,
|
||||
includedIdentifier = filter.Since,
|
||||
excludedIdentifier = filter.Until
|
||||
};
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace LibGit2Sharp.Core
|
|||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name = "result">The result to examine.</param>
|
||||
/// <param name="allowPositiveResult">False to only allow success when comparing against 0,
|
||||
/// <param name="allowPositiveResult">False to only allow success when comparing against 0,
|
||||
/// True when positive values are allowed as well.</param>
|
||||
public static void Success(int result, bool allowPositiveResult = false)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace LibGit2Sharp.Core
|
|||
/// <summary>
|
||||
/// The raw binary 20 byte Id.
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
public byte[] Id;
|
||||
}
|
||||
}
|
|
@ -133,7 +133,7 @@ namespace LibGit2Sharp.Core
|
|||
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);
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ namespace LibGit2Sharp.Core
|
|||
if (posixDirectorySeparatorChar == Path.DirectorySeparatorChar)
|
||||
{
|
||||
return nativePath;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (nativePath == null)
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace LibGit2Sharp
|
|||
private readonly Func<GitObject> targetResolver;
|
||||
private bool resolved;
|
||||
private GitObject target;
|
||||
|
||||
|
||||
internal DirectReference(Func<GitObject> targetResolver)
|
||||
{
|
||||
this.targetResolver = targetResolver;
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace LibGit2Sharp
|
|||
{
|
||||
return Equals(obj as GitObject);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified <see cref="GitObject"/> is equal to the current <see cref="GitObject"/>.
|
||||
/// </summary>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
Any = -2,
|
||||
|
||||
/// <summary>
|
||||
/// Object is invalid.
|
||||
/// Object is invalid.
|
||||
/// </summary>
|
||||
Bad = -1,
|
||||
|
||||
|
@ -24,27 +24,27 @@
|
|||
/// A commit object.
|
||||
/// </summary>
|
||||
Commit = 1,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A tree (directory listing) object.
|
||||
/// </summary>
|
||||
Tree = 2,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A file revision object.
|
||||
/// </summary>
|
||||
Blob = 3,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// An annotated tag object.
|
||||
/// </summary>
|
||||
Tag = 4,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Reserved for future use.
|
||||
/// </summary>
|
||||
Ext2 = 5,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A delta, base is given by an offset.
|
||||
/// </summary>
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace LibGit2Sharp
|
|||
{
|
||||
get { return handle; }
|
||||
}
|
||||
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return (int)NativeMethods.git_index_entrycount(handle); }
|
||||
|
@ -162,7 +162,7 @@ namespace LibGit2Sharp
|
|||
RemoveFromIndex(relativeSourcePath);
|
||||
|
||||
File.Move(Path.Combine(wd, relativeSourcePath), Path.Combine(wd, relativeDestinationPath));
|
||||
|
||||
|
||||
AddToIndex(relativeDestinationPath);
|
||||
|
||||
UpdatePhysicalIndex();
|
||||
|
@ -190,7 +190,7 @@ namespace LibGit2Sharp
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
File.WriteAllBytes(Path.Combine(repo.Info.WorkingDirectory, relativePath), ((Blob) currentHeadBlob.Target).Content);
|
||||
AddToIndex(relativePath);
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ namespace LibGit2Sharp
|
|||
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))
|
||||
{
|
||||
|
|
|
@ -283,9 +283,9 @@ namespace LibGit2Sharp
|
|||
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(
|
||||
|
|
|
@ -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 @@ using System.Runtime.InteropServices;
|
|||
|
||||
[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 @@ using System.Runtime.InteropServices;
|
|||
// 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.*")]
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace LibGit2Sharp
|
|||
Ensure.ArgumentNotNullOrEmptyString(target, "target");
|
||||
|
||||
ObjectId id;
|
||||
|
||||
|
||||
IntPtr reference;
|
||||
int res;
|
||||
|
||||
|
@ -97,9 +97,9 @@ namespace LibGit2Sharp
|
|||
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 @@ namespace LibGit2Sharp
|
|||
}
|
||||
|
||||
var obj = repo.Lookup(targetId);
|
||||
|
||||
|
||||
if (obj == null)
|
||||
{
|
||||
Ensure.Success((int) GitErrorCode.GIT_ENOTFOUND);
|
||||
|
@ -147,7 +147,7 @@ namespace LibGit2Sharp
|
|||
Ensure.ArgumentNotNullOrEmptyString(newName, "newName");
|
||||
|
||||
IntPtr referencePtr = RetrieveReferencePtr(currentName);
|
||||
|
||||
|
||||
int res = NativeMethods.git_reference_rename(referencePtr, newName, allowOverwrite);
|
||||
Ensure.Success(res);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace LibGit2Sharp
|
|||
get
|
||||
{
|
||||
Reference headRef = Refs["HEAD"];
|
||||
|
||||
|
||||
if (Info.IsEmpty)
|
||||
{
|
||||
return new Branch(headRef.TargetIdentifier, null, this);
|
||||
|
@ -86,7 +86,7 @@ namespace LibGit2Sharp
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lookup and enumerate commits in the repository.
|
||||
/// Lookup and enumerate commits in the repository.
|
||||
/// Iterating this collection directly starts walking from the HEAD.
|
||||
/// </summary>
|
||||
public IQueryableCommitCollection Commits
|
||||
|
@ -146,7 +146,7 @@ namespace LibGit2Sharp
|
|||
|
||||
/// <summary>
|
||||
/// Tells if the specified sha exists in the repository.
|
||||
///
|
||||
///
|
||||
/// Exceptions:
|
||||
/// ArgumentException
|
||||
/// ArgumentNullException
|
||||
|
@ -263,7 +263,7 @@ namespace LibGit2Sharp
|
|||
|
||||
/// <summary>
|
||||
/// Probe for a git repository.
|
||||
/// <para>The lookup start from <paramref name="startingPath"/> and walk upward parent directories if nothing has been found.</para>
|
||||
/// <para>The lookup start from <paramref name="startingPath"/> and walk upward parent directories if nothing has been found.</para>
|
||||
/// </summary>
|
||||
/// <param name="startingPath">The base path where the lookup starts.</param>
|
||||
/// <returns>The path to the git repository.</returns>
|
||||
|
|
Загрузка…
Ссылка в новой задаче