Skip to content

Commit

Permalink
Remove trailing white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltoken committed Jul 15, 2011
1 parent 66cbcc0 commit 7fa704c
Show file tree
Hide file tree
Showing 25 changed files with 53 additions and 56 deletions.
3 changes: 1 addition & 2 deletions BACKLOG.md
Expand Up @@ -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

1 change: 0 additions & 1 deletion CHANGELOG.md
Expand Up @@ -70,4 +70,3 @@
## v0.1.0

- Initial release

2 changes: 1 addition & 1 deletion CI-build.msbuild
Expand Up @@ -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)')" />
Expand Down
1 change: 0 additions & 1 deletion LICENSE.md
Expand Up @@ -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.

4 changes: 2 additions & 2 deletions LibGit2Sharp.Tests/BranchFixture.cs
Expand Up @@ -328,7 +328,7 @@ public void CanMoveABranchWhileOverwritingAnExistingOne()
newTest.Tip.ShouldEqual(br2.Tip);
}
}

[Test]
public void CreatingABranchTriggersTheCreationOfADirectReference()
{
Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp.Tests/CommitFixture.cs
Expand Up @@ -219,7 +219,7 @@ public void CanEnumerateUsingTwoAbbreviatedShasAsBoundaries()
CollectionAssert.AreEquivalent(new[] { "a4a7dce", "c47800c", "9fd738e" }, abbrevShas);
}
}

[Test]
public void CanLookupCommitGeneric()
{
Expand Down
6 changes: 3 additions & 3 deletions LibGit2Sharp.Tests/IndexFixture.cs
Expand Up @@ -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",
Expand Down Expand Up @@ -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;

Expand Down
10 changes: 5 additions & 5 deletions 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.

Expand All @@ -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)]
Expand All @@ -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.*")]

Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp.Tests/ReferenceFixture.cs
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp.Tests/RepositoryFixture.cs
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions LibGit2Sharp.Tests/TagFixture.cs
Expand Up @@ -375,7 +375,7 @@ public void BlindlyCreatingAnAnnotatedTagOverAnExistingOneThrows()
Assert.Throws<ApplicationException>(() => repo.Tags.Create("e90810b", "refs/heads/br2", signatureNtk, "a nice message"));
}
}

[Test]
public void CreateTagWithADuplicateNameThrows()
{
Expand Down Expand Up @@ -548,7 +548,7 @@ public void ListAllTagsShouldOutputThemInAnOrderedWay()
using (var repo = new Repository(Constants.BareTestRepoPath))
{
List<string> tagNames = repo.Tags.Select(t => t.Name).ToList();

var sortedTags = expectedTags;
sortedTags.Sort();

Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/BranchCollection.cs
Expand Up @@ -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];
}
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/CommitCollection.cs
Expand Up @@ -86,7 +86,7 @@ public ICommitCollection QueryBy(Filter filter)

return new CommitCollection(repo, filter.SortBy)
{
includedIdentifier = filter.Since,
includedIdentifier = filter.Since,
excludedIdentifier = filter.Until
};
}
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/Ensure.cs
Expand Up @@ -46,7 +46,7 @@ public static void ArgumentNotNullOrEmptyString(string argumentValue, string arg
/// </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)
{
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/GitOid.cs
Expand Up @@ -10,7 +10,7 @@ internal struct GitOid
/// <summary>
/// The raw binary 20 byte Id.
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
public byte[] Id;
}
}
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/NativeMethods.cs
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions LibGit2Sharp/Core/PosixPathHelper.cs
Expand Up @@ -11,8 +11,8 @@ public static string ToPosix(string nativePath)
if (posixDirectorySeparatorChar == Path.DirectorySeparatorChar)
{
return nativePath;
}
}

if (nativePath == null)
{
return null;
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/DirectReference.cs
Expand Up @@ -10,7 +10,7 @@ public class DirectReference : Reference
private readonly Func<GitObject> targetResolver;
private bool resolved;
private GitObject target;

internal DirectReference(Func<GitObject> targetResolver)
{
this.targetResolver = targetResolver;
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/GitObject.cs
Expand Up @@ -84,7 +84,7 @@ public override bool Equals(object obj)
{
return Equals(obj as GitObject);
}

/// <summary>
/// Determines whether the specified <see cref="GitObject"/> is equal to the current <see cref="GitObject"/>.
/// </summary>
Expand Down
12 changes: 6 additions & 6 deletions LibGit2Sharp/GitObjectType.cs
Expand Up @@ -11,7 +11,7 @@ public enum GitObjectType
Any = -2,

/// <summary>
/// Object is invalid.
/// Object is invalid.
/// </summary>
Bad = -1,

Expand All @@ -24,27 +24,27 @@ public enum GitObjectType
/// 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>
Expand Down
8 changes: 4 additions & 4 deletions LibGit2Sharp/Index.cs
Expand Up @@ -23,7 +23,7 @@ internal IndexSafeHandle Handle
{
get { return handle; }
}

public int Count
{
get { return (int)NativeMethods.git_index_entrycount(handle); }
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -190,7 +190,7 @@ private void RestorePotentialPreviousVersionOf(string relativePath)
{
return;
}

File.WriteAllBytes(Path.Combine(repo.Info.WorkingDirectory, relativePath), ((Blob) currentHeadBlob.Target).Content);
AddToIndex(relativePath);
}
Expand All @@ -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))
{
Expand Down
6 changes: 3 additions & 3 deletions LibGit2Sharp/ObjectId.cs
Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions LibGit2Sharp/Properties/AssemblyInfo.cs
Expand Up @@ -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.

Expand All @@ -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)]
Expand All @@ -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.*")]

Expand Down
10 changes: 5 additions & 5 deletions LibGit2Sharp/ReferenceCollection.cs
Expand Up @@ -71,7 +71,7 @@ public Reference Create(string name, string target, bool allowOverwrite = false)
Ensure.ArgumentNotNullOrEmptyString(target, "target");

ObjectId id;

IntPtr reference;
int res;

Expand All @@ -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);
}

Expand All @@ -111,7 +111,7 @@ private ObjectId Unabbreviate(ObjectId targetId)
}

var obj = repo.Lookup(targetId);

if (obj == null)
{
Ensure.Success((int) GitErrorCode.GIT_ENOTFOUND);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 7fa704c

Please sign in to comment.