Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2015-01-02 23:29:08 +0300
committernulltoken <emeric.fermas@gmail.com>2015-01-04 23:14:32 +0300
commit7e5785871e4cebd3c18202263d8fb75a26e55eea (patch)
treed3d0c64740ad6d76ae594faf17d5be18a0cd907c /LibGit2Sharp.Tests
parent56633ebfa7c8e6b1e30762e8b543d83d1e0ea102 (diff)
Rename Clone() test helper method in Sandbox()
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/ArchiveTarFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/AttributesFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/BlobFixture.cs8
-rw-r--r--LibGit2Sharp.Tests/BranchFixture.cs56
-rw-r--r--LibGit2Sharp.Tests/CheckoutFixture.cs34
-rw-r--r--LibGit2Sharp.Tests/CherryPickFixture.cs6
-rw-r--r--LibGit2Sharp.Tests/CleanFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/CommitFixture.cs30
-rw-r--r--LibGit2Sharp.Tests/ConfigurationFixture.cs14
-rw-r--r--LibGit2Sharp.Tests/ConflictFixture.cs4
-rw-r--r--LibGit2Sharp.Tests/CurrentOperationFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/DiffBlobToBlobFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs6
-rw-r--r--LibGit2Sharp.Tests/DiffWorkdirToIndexFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/FilterBranchFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/IgnoreFixture.cs6
-rw-r--r--LibGit2Sharp.Tests/IndexFixture.cs8
-rw-r--r--LibGit2Sharp.Tests/MergeFixture.cs50
-rw-r--r--LibGit2Sharp.Tests/NoteFixture.cs16
-rw-r--r--LibGit2Sharp.Tests/ObjectDatabaseFixture.cs22
-rw-r--r--LibGit2Sharp.Tests/OdbBackendFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/PushFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/RefSpecFixture.cs18
-rw-r--r--LibGit2Sharp.Tests/ReferenceFixture.cs58
-rw-r--r--LibGit2Sharp.Tests/ReflogFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/RemoteFixture.cs24
-rw-r--r--LibGit2Sharp.Tests/RemoveFixture.cs8
-rw-r--r--LibGit2Sharp.Tests/RepositoryFixture.cs4
-rw-r--r--LibGit2Sharp.Tests/RepositoryOptionsFixture.cs10
-rw-r--r--LibGit2Sharp.Tests/ResetHeadFixture.cs8
-rw-r--r--LibGit2Sharp.Tests/ResetIndexFixture.cs18
-rw-r--r--LibGit2Sharp.Tests/RevertFixture.cs22
-rw-r--r--LibGit2Sharp.Tests/StageFixture.cs22
-rw-r--r--LibGit2Sharp.Tests/StashFixture.cs20
-rw-r--r--LibGit2Sharp.Tests/StatusFixture.cs26
-rw-r--r--LibGit2Sharp.Tests/SubmoduleFixture.cs12
-rw-r--r--LibGit2Sharp.Tests/TagFixture.cs56
-rw-r--r--LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs30
-rw-r--r--LibGit2Sharp.Tests/TreeFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/UnstageFixture.cs24
40 files changed, 321 insertions, 321 deletions
diff --git a/LibGit2Sharp.Tests/ArchiveTarFixture.cs b/LibGit2Sharp.Tests/ArchiveTarFixture.cs
index a59b2360..88afb35e 100644
--- a/LibGit2Sharp.Tests/ArchiveTarFixture.cs
+++ b/LibGit2Sharp.Tests/ArchiveTarFixture.cs
@@ -11,7 +11,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanArchiveACommitWithDirectoryAsTar()
{
- var path = CloneBareTestRepo();
+ var path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
// This tests generates an archive of the bare test repo, and compares it with
diff --git a/LibGit2Sharp.Tests/AttributesFixture.cs b/LibGit2Sharp.Tests/AttributesFixture.cs
index b6700bec..c9c4eb71 100644
--- a/LibGit2Sharp.Tests/AttributesFixture.cs
+++ b/LibGit2Sharp.Tests/AttributesFixture.cs
@@ -9,7 +9,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void StagingHonorsTheAttributesFiles()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
CreateAttributesFile(repo);
diff --git a/LibGit2Sharp.Tests/BlobFixture.cs b/LibGit2Sharp.Tests/BlobFixture.cs
index 8e272242..dc90eee5 100644
--- a/LibGit2Sharp.Tests/BlobFixture.cs
+++ b/LibGit2Sharp.Tests/BlobFixture.cs
@@ -30,7 +30,7 @@ namespace LibGit2Sharp.Tests
{
SkipIfNotSupported(autocrlf);
- var path = CloneBareTestRepo();
+ var path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("core.autocrlf", autocrlf);
@@ -52,7 +52,7 @@ namespace LibGit2Sharp.Tests
[InlineData("utf-32", 20, "FF FE 00 00 31 00 00 00 32 00 00 00 33 00 00 00 34 00 00 00")]
public void CanGetBlobAsTextWithVariousEncodings(string encodingName, int expectedContentBytes, string expectedUtf7Chars)
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var bomFile = "bom.txt";
@@ -129,7 +129,7 @@ namespace LibGit2Sharp.Tests
{
SkipIfNotSupported(autocrlf);
- var path = CloneBareTestRepo();
+ var path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("core.autocrlf", autocrlf);
@@ -153,7 +153,7 @@ namespace LibGit2Sharp.Tests
{
var binaryContent = new byte[] { 0, 1, 2, 3, 4, 5 };
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
using (var stream = new MemoryStream(binaryContent))
diff --git a/LibGit2Sharp.Tests/BranchFixture.cs b/LibGit2Sharp.Tests/BranchFixture.cs
index 486a43e2..15d9c6ea 100644
--- a/LibGit2Sharp.Tests/BranchFixture.cs
+++ b/LibGit2Sharp.Tests/BranchFixture.cs
@@ -17,7 +17,7 @@ namespace LibGit2Sharp.Tests
[InlineData("Ångström")]
public void CanCreateBranch(string name)
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -50,7 +50,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateAnUnbornBranch()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// No branch named orphan
@@ -85,7 +85,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateBranchUsingAbbreviatedSha()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -108,7 +108,7 @@ namespace LibGit2Sharp.Tests
[InlineData("master")]
public void CanCreateBranchFromImplicitHead(string headCommitOrBranchSpec)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -136,7 +136,7 @@ namespace LibGit2Sharp.Tests
[InlineData("master")]
public void CanCreateBranchFromExplicitHead(string headCommitOrBranchSpec)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -157,7 +157,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateBranchFromCommit()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -177,7 +177,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateBranchFromRevparseSpec()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -200,7 +200,7 @@ namespace LibGit2Sharp.Tests
[InlineData("refs/tags/test")]
public void CreatingABranchFromATagPeelsToTheCommit(string committish)
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -220,7 +220,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CreatingABranchTriggersTheCreationOfADirectReference()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Branch newBranch = repo.CreateBranch("clone-of-master");
@@ -293,7 +293,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanListBranchesWithRemoteAndLocalBranchWithSameShortName()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Create a local branch with the same short name as a remote branch.
@@ -404,7 +404,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void QueryUnresolvableRemoteForRemoteBranch()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
var fetchRefSpecs = new string[] { "+refs/heads/notfound/*:refs/remotes/origin/notfound/*" };
@@ -429,7 +429,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void QueryAmbigousRemoteForRemoteBranch()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
var fetchRefSpec = "+refs/heads/*:refs/remotes/origin/*";
var url = "http://github.com/libgit2/TestGitRepository";
@@ -485,7 +485,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanLookupABranchWhichNameIsMadeOfNon7BitsAsciiCharacters()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string name = "Ångström";
@@ -539,7 +539,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanGetTrackingInformationFromBranchSharingNoHistoryWithItsTrackedBranch()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
@@ -565,7 +565,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void TrackingInformationIsEmptyForBranchTrackingPrunedRemoteBranch()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string remoteRef = "refs/remotes/origin/master";
@@ -660,7 +660,7 @@ namespace LibGit2Sharp.Tests
const string testBranchName = "branchToSetUpstreamInfoFor";
const string trackedBranchName = "refs/remotes/origin/master";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch branch = repo.CreateBranch(testBranchName);
@@ -692,7 +692,7 @@ namespace LibGit2Sharp.Tests
const string trackedBranchName = "refs/remotes/origin/master";
var fetchRefSpecs = new string[] { "+refs/heads/notfound/*:refs/remotes/origin/notfound/*" };
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Modify the fetch spec so that the remote for the remote-tracking branch
@@ -720,7 +720,7 @@ namespace LibGit2Sharp.Tests
const string trackedBranchName = "refs/remotes/origin/master";
const string remoteName = "origin";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch branch = repo.CreateBranch(testBranchName);
@@ -750,7 +750,7 @@ namespace LibGit2Sharp.Tests
const string testBranchName = "branchToSetUpstreamInfoFor";
const string localTrackedBranchName = "refs/heads/master";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch branch = repo.CreateBranch(testBranchName);
@@ -788,7 +788,7 @@ namespace LibGit2Sharp.Tests
const string testBranchName = "branchToSetUpstreamInfoFor";
const string trackedBranchName = "refs/remotes/origin/master";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch branch = repo.CreateBranch(testBranchName);
@@ -822,7 +822,7 @@ namespace LibGit2Sharp.Tests
private void AssertRemoval(string branchName, bool isRemote, bool shouldPreviouslyAssertExistence)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
if (shouldPreviouslyAssertExistence)
@@ -849,7 +849,7 @@ namespace LibGit2Sharp.Tests
[InlineData("origin/br2")]
public void CanRemoveAnExistingBranch(string branchName)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch curBranch = repo.Branches[branchName];
@@ -919,7 +919,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void TwoBranchesPointingAtTheSameCommitAreNotBothCurrent()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["refs/heads/master"];
@@ -932,7 +932,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRenameABranch()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -966,7 +966,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRenameABranchWhileOverwritingAnExistingOne()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -998,7 +998,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void DetachedHeadIsNotATrackingBranch()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard);
@@ -1095,7 +1095,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CreatingABranchIncludesTheCorrectReflogEntries()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -1111,7 +1111,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RenamingABranchIncludesTheCorrectReflogEntries()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
diff --git a/LibGit2Sharp.Tests/CheckoutFixture.cs b/LibGit2Sharp.Tests/CheckoutFixture.cs
index c8e6e976..78813eb2 100644
--- a/LibGit2Sharp.Tests/CheckoutFixture.cs
+++ b/LibGit2Sharp.Tests/CheckoutFixture.cs
@@ -19,7 +19,7 @@ namespace LibGit2Sharp.Tests
[InlineData("diff-test-cases")]
public void CanCheckoutAnExistingBranch(string branchName)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
@@ -62,7 +62,7 @@ namespace LibGit2Sharp.Tests
[InlineData("diff-test-cases")]
public void CanCheckoutAnExistingBranchByName(string branchName)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
@@ -104,7 +104,7 @@ namespace LibGit2Sharp.Tests
[InlineData("HEAD~2", false, "4c062a6361ae6959e06292c1fa5e2822d9c96345")]
public void CanCheckoutAnArbitraryCommit(string commitPointer, bool checkoutByCommitOrBranchSpec, string expectedReflogTarget)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
@@ -237,7 +237,7 @@ namespace LibGit2Sharp.Tests
// 4) Create conflicting change
// 5) Forcefully checkout master
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
@@ -699,7 +699,7 @@ namespace LibGit2Sharp.Tests
[InlineData("origin/master")]
public void CheckingOutRemoteBranchResultsInDetachedHead(string remoteBranchSpec)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
@@ -719,7 +719,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckingOutABranchDoesNotAlterBinaryFiles()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// $ git hash-object square-logo.png
@@ -748,7 +748,7 @@ namespace LibGit2Sharp.Tests
[InlineData("e90810^{}")]
public void CheckoutFromDetachedHead(string commitPointer)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Set the working directory to the current head
@@ -774,7 +774,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckoutBranchFromDetachedHead()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Set the working directory to the current head
@@ -799,7 +799,7 @@ namespace LibGit2Sharp.Tests
[InlineData("heads/master", "refs/heads/master")]
public void CheckoutBranchByShortNameAttachesTheHead(string shortBranchName, string referenceName)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Set the working directory to the current head
@@ -820,7 +820,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckoutPreviousCheckedOutBranch()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Set the working directory to the current head
@@ -842,7 +842,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckoutCurrentReference()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
@@ -898,7 +898,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCheckoutAttachedHead()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.False(repo.Info.IsHeadDetached);
@@ -914,7 +914,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCheckoutDetachedHead()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Checkout(repo.Head.Tip.Sha);
@@ -936,7 +936,7 @@ namespace LibGit2Sharp.Tests
[InlineData("i-do-numbers", "diff-test-cases", "numbers.txt", FileStatus.Staged)]
public void CanCheckoutPath(string originalBranch, string checkoutFrom, string path, FileStatus expectedStatus)
{
- string repoPath = CloneStandardTestRepo();
+ string repoPath = SandboxStandardTestRepo();
using (var repo = new Repository(repoPath))
{
// Set the working directory to the current head
@@ -955,7 +955,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCheckoutPaths()
{
- string repoPath = CloneStandardTestRepo();
+ string repoPath = SandboxStandardTestRepo();
var checkoutPaths = new[] { "numbers.txt", "super-file.txt" };
using (var repo = new Repository(repoPath))
@@ -976,7 +976,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CannotCheckoutPathsWithEmptyOrNullPathArgument()
{
- string repoPath = CloneStandardTestRepo();
+ string repoPath = SandboxStandardTestRepo();
using (var repo = new Repository(repoPath))
{
@@ -999,7 +999,7 @@ namespace LibGit2Sharp.Tests
[InlineData("1.txt")]
public void CanCheckoutPathFromCurrentBranch(string fileName)
{
- string repoPath = CloneStandardTestRepo();
+ string repoPath = SandboxStandardTestRepo();
using (var repo = new Repository(repoPath))
{
diff --git a/LibGit2Sharp.Tests/CherryPickFixture.cs b/LibGit2Sharp.Tests/CherryPickFixture.cs
index 7afb3f03..be08684c 100644
--- a/LibGit2Sharp.Tests/CherryPickFixture.cs
+++ b/LibGit2Sharp.Tests/CherryPickFixture.cs
@@ -14,7 +14,7 @@ namespace LibGit2Sharp.Tests
[InlineData(false)]
public void CanCherryPick(bool fromDetachedHead)
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
if (fromDetachedHead)
@@ -42,7 +42,7 @@ namespace LibGit2Sharp.Tests
const string secondBranchFileName = "second branch file.txt";
const string sharedBranchFileName = "first+second branch file.txt";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var firstBranch = repo.CreateBranch("FirstBranch");
@@ -83,7 +83,7 @@ namespace LibGit2Sharp.Tests
const string conflictFile = "a.txt";
const string conflictBranchName = "conflicts";
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
Branch branch = repo.Branches[conflictBranchName];
diff --git a/LibGit2Sharp.Tests/CleanFixture.cs b/LibGit2Sharp.Tests/CleanFixture.cs
index 358000b9..b2c5aa7b 100644
--- a/LibGit2Sharp.Tests/CleanFixture.cs
+++ b/LibGit2Sharp.Tests/CleanFixture.cs
@@ -9,7 +9,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCleanWorkingDirectory()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Verify that there are the expected number of entries and untracked files
diff --git a/LibGit2Sharp.Tests/CommitFixture.cs b/LibGit2Sharp.Tests/CommitFixture.cs
index a4d7eca4..ee95ed76 100644
--- a/LibGit2Sharp.Tests/CommitFixture.cs
+++ b/LibGit2Sharp.Tests/CommitFixture.cs
@@ -26,7 +26,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCorrectlyCountCommitsWhenSwitchingToAnotherBranch()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Hard reset and then remove untracked files
@@ -61,7 +61,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanEnumerateCommitsInDetachedHeadState()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
ObjectId parentOfHead = repo.Head.Tip.Parents.First().Id;
@@ -111,7 +111,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void QueryingTheCommitHistoryFromACorruptedReferenceThrows()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
CreateCorruptedDeadBeefHead(repo.Info.Path);
@@ -255,7 +255,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanEnumerateFromDetachedHead()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repoClone = new Repository(path))
{
// Hard reset and then remove untracked files
@@ -400,7 +400,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanEnumerateCommitsFromATagWhichPointsToATree()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
string headTreeSha = repo.Head.Tip.Tree.Sha;
@@ -575,7 +575,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CommitParentsAreMergeHeads()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard, "c47800");
@@ -786,7 +786,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAmendACommitWithMoreThanOneParent()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var mergedCommit = repo.Lookup<Commit>("be3563a");
@@ -842,7 +842,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveChildrenOfASpecificCommit()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string parentSha = "5b5b025afb0b4c913b4c338a42934a3863bf3644";
@@ -874,7 +874,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCorrectlyDistinguishAuthorFromCommitter()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var author = new Signature("Wilbert van Dolleweerd", "getit@xs4all.nl",
@@ -914,7 +914,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanNotCommitAnEmptyCommit()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard);
@@ -927,7 +927,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCommitAnEmptyCommitWhenForced()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard);
@@ -941,7 +941,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanNotAmendAnEmptyCommit()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard);
@@ -958,7 +958,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAmendAnEmptyCommitWhenForced()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard);
@@ -976,7 +976,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCommitAnEmptyCommitWhenMerging()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard);
@@ -997,7 +997,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAmendAnEmptyMergeCommit()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(ResetMode.Hard);
diff --git a/LibGit2Sharp.Tests/ConfigurationFixture.cs b/LibGit2Sharp.Tests/ConfigurationFixture.cs
index ad085a5a..48517f54 100644
--- a/LibGit2Sharp.Tests/ConfigurationFixture.cs
+++ b/LibGit2Sharp.Tests/ConfigurationFixture.cs
@@ -46,7 +46,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUnsetAnEntryFromTheLocalConfiguration()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.Null(repo.Config.Get<bool>("unittests.boolsetting"));
@@ -231,7 +231,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanSetBooleanValue()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("unittests.boolsetting", true);
@@ -252,7 +252,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanSetIntValue()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("unittests.intsetting", 3);
@@ -264,7 +264,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanSetLongValue()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("unittests.longsetting", (long)451);
@@ -276,7 +276,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanSetStringValue()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("unittests.stringsetting", "val");
@@ -288,7 +288,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanSetAndReadUnicodeStringValue()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("unittests.stringsetting", "Juliën");
@@ -346,7 +346,7 @@ namespace LibGit2Sharp.Tests
var options = BuildFakeConfigs(scd);
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path, options))
{
Assert.True(repo.Config.HasConfig(ConfigurationLevel.Local));
diff --git a/LibGit2Sharp.Tests/ConflictFixture.cs b/LibGit2Sharp.Tests/ConflictFixture.cs
index 148081c4..f32f67ad 100644
--- a/LibGit2Sharp.Tests/ConflictFixture.cs
+++ b/LibGit2Sharp.Tests/ConflictFixture.cs
@@ -66,7 +66,7 @@ namespace LibGit2Sharp.Tests
public void CanResolveConflictsByRemovingFromTheIndex(
bool removeFromWorkdir, string filename, bool existsBeforeRemove, bool existsAfterRemove, FileStatus lastStatus, int removedIndexEntries)
{
- var path = CloneMergedTestRepo();
+ var path = SandboxMergedTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -92,7 +92,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanGetOriginalNamesOfRenameConflicts()
{
- var path = CloneMergeRenamesTestRepo();
+ var path = SandboxMergeRenamesTestRepo();
using (var repo = new Repository(path))
{
var expected = RenameConflictData;
diff --git a/LibGit2Sharp.Tests/CurrentOperationFixture.cs b/LibGit2Sharp.Tests/CurrentOperationFixture.cs
index 5b920031..762d09f6 100644
--- a/LibGit2Sharp.Tests/CurrentOperationFixture.cs
+++ b/LibGit2Sharp.Tests/CurrentOperationFixture.cs
@@ -41,7 +41,7 @@ namespace LibGit2Sharp.Tests
[InlineData("rebase-merge/whatever", CurrentOperation.RebaseMerge)]
public void CurrentOperationHasExpectedPendingOperationValues(string stateFile, CurrentOperation expectedState)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
Touch(Path.Combine(path, ".git"), stateFile);
diff --git a/LibGit2Sharp.Tests/DiffBlobToBlobFixture.cs b/LibGit2Sharp.Tests/DiffBlobToBlobFixture.cs
index c0711a46..6eb84f1a 100644
--- a/LibGit2Sharp.Tests/DiffBlobToBlobFixture.cs
+++ b/LibGit2Sharp.Tests/DiffBlobToBlobFixture.cs
@@ -72,7 +72,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCompareATextualBlobAgainstABinaryBlob()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Blob binBlob = CreateBinaryBlob(repo);
diff --git a/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs b/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
index 2ba238f4..14639fe4 100644
--- a/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
+++ b/LibGit2Sharp.Tests/DiffTreeToTreeFixture.cs
@@ -89,7 +89,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanDetectABinaryChange()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
const string filename = "binfile.foo";
var filepath = Path.Combine(repo.Info.WorkingDirectory, filename);
@@ -115,7 +115,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanDetectABinaryDeletion()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
const string filename = "binfile.foo";
var filepath = Path.Combine(repo.Info.WorkingDirectory, filename);
@@ -1000,7 +1000,7 @@ namespace LibGit2Sharp.Tests
{
const string file = "1/branch_file.txt";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
TreeEntry entry = repo.Head[file];
diff --git a/LibGit2Sharp.Tests/DiffWorkdirToIndexFixture.cs b/LibGit2Sharp.Tests/DiffWorkdirToIndexFixture.cs
index fd0a34b4..c46a19d8 100644
--- a/LibGit2Sharp.Tests/DiffWorkdirToIndexFixture.cs
+++ b/LibGit2Sharp.Tests/DiffWorkdirToIndexFixture.cs
@@ -105,7 +105,7 @@ namespace LibGit2Sharp.Tests
{
const string file = "1/branch_file.txt";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
TreeEntry entry = repo.Head[file];
diff --git a/LibGit2Sharp.Tests/FilterBranchFixture.cs b/LibGit2Sharp.Tests/FilterBranchFixture.cs
index bdfb137e..dfe14329 100644
--- a/LibGit2Sharp.Tests/FilterBranchFixture.cs
+++ b/LibGit2Sharp.Tests/FilterBranchFixture.cs
@@ -15,7 +15,7 @@ namespace LibGit2Sharp.Tests
public FilterBranchFixture()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
repo = new Repository(path);
}
diff --git a/LibGit2Sharp.Tests/IgnoreFixture.cs b/LibGit2Sharp.Tests/IgnoreFixture.cs
index 523a08c8..2ae8dd2f 100644
--- a/LibGit2Sharp.Tests/IgnoreFixture.cs
+++ b/LibGit2Sharp.Tests/IgnoreFixture.cs
@@ -11,7 +11,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void TemporaryRulesShouldApplyUntilCleared()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Touch(repo.Info.WorkingDirectory, "Foo.cs", "Bar");
@@ -31,7 +31,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void IsPathIgnoredShouldVerifyWhetherPathIsIgnored()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Touch(repo.Info.WorkingDirectory, "Foo.cs", "Bar");
@@ -70,7 +70,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCheckIfAPathIsIgnoredUsingThePreferedPlatformDirectorySeparatorChar()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Touch(repo.Info.WorkingDirectory, ".gitignore", "/NewFolder\n/NewFolder/NewFolder");
diff --git a/LibGit2Sharp.Tests/IndexFixture.cs b/LibGit2Sharp.Tests/IndexFixture.cs
index a1ec882a..ee75793b 100644
--- a/LibGit2Sharp.Tests/IndexFixture.cs
+++ b/LibGit2Sharp.Tests/IndexFixture.cs
@@ -139,7 +139,7 @@ namespace LibGit2Sharp.Tests
[InlineData("modified_unstaged_file.txt", FileStatus.Modified, "deleted_unstaged_file.txt", FileStatus.Missing, FileStatus.Removed, FileStatus.Staged)]
public void CanMoveAnExistingFileOverANonExistingFile(string sourcePath, FileStatus sourceStatus, string destPath, FileStatus destStatus, FileStatus sourcePostStatus, FileStatus destPostStatus)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.Equal(sourceStatus, repo.RetrieveStatus(sourcePath));
@@ -282,7 +282,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetFullyMergedIndexFromTree()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
const string testFile = "new_tracked_file.txt";
@@ -313,7 +313,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetIndexWithUnmergedEntriesFromTree()
{
- string path = CloneMergedTestRepo();
+ string path = SandboxMergedTestRepo();
const string testFile = "one.txt";
@@ -344,7 +344,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanClearTheIndex()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
const string testFile = "1.txt";
// It is sufficient to check just one of the stage area changes, such as the modified file,
diff --git a/LibGit2Sharp.Tests/MergeFixture.cs b/LibGit2Sharp.Tests/MergeFixture.cs
index 428a6f67..94245a5b 100644
--- a/LibGit2Sharp.Tests/MergeFixture.cs
+++ b/LibGit2Sharp.Tests/MergeFixture.cs
@@ -65,7 +65,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveTheBranchBeingMerged()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string firstBranch = "9fd738e8f7967c078dceed8190330fc8648ee56a";
@@ -86,7 +86,7 @@ namespace LibGit2Sharp.Tests
const string secondBranchFileName = "second branch file.txt";
const string sharedBranchFileName = "first+second branch file.txt";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
@@ -136,7 +136,7 @@ namespace LibGit2Sharp.Tests
{
const string sharedBranchFileName = "first+second branch file.txt";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var firstBranch = repo.CreateBranch("FirstBranch");
@@ -163,7 +163,7 @@ namespace LibGit2Sharp.Tests
const string firstBranchFileName = "first branch file.txt";
const string sharedBranchFileName = "first+second branch file.txt";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
// Reset the index and the working tree.
@@ -220,7 +220,7 @@ namespace LibGit2Sharp.Tests
const string secondBranchFileName = "second branch file.txt";
const string sharedBranchFileName = "first+second branch file.txt";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var firstBranch = repo.CreateBranch("FirstBranch");
@@ -260,7 +260,7 @@ namespace LibGit2Sharp.Tests
const string secondBranchFileName = "second branch file.bin";
const string sharedBranchFileName = "first+second branch file.bin";
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var firstBranch = repo.CreateBranch("FirstBranch");
@@ -300,7 +300,7 @@ namespace LibGit2Sharp.Tests
[InlineData(false, FastForwardStrategy.FastForwardOnly, fastForwardBranchInitialId, MergeStatus.FastForward)]
public void CanFastForwardCommit(bool fromDetachedHead, FastForwardStrategy fastForwardStrategy, string expectedCommitId, MergeStatus expectedMergeStatus)
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
if(fromDetachedHead)
@@ -326,7 +326,7 @@ namespace LibGit2Sharp.Tests
[InlineData(false, FastForwardStrategy.NoFastFoward, MergeStatus.NonFastForward)]
public void CanNonFastForwardMergeCommit(bool fromDetachedHead, FastForwardStrategy fastForwardStrategy, MergeStatus expectedMergeStatus)
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
if (fromDetachedHead)
@@ -347,7 +347,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void MergeReportsCheckoutProgress()
{
- string repoPath = CloneMergeTestRepo();
+ string repoPath = SandboxMergeTestRepo();
using (var repo = new Repository(repoPath))
{
Commit commitToMerge = repo.Branches["normal_merge"].Tip;
@@ -368,7 +368,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void MergeReportsCheckoutNotifications()
{
- string repoPath = CloneMergeTestRepo();
+ string repoPath = SandboxMergeTestRepo();
using (var repo = new Repository(repoPath))
{
Commit commitToMerge = repo.Branches["normal_merge"].Tip;
@@ -392,7 +392,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void FastForwardMergeReportsCheckoutProgress()
{
- string repoPath = CloneMergeTestRepo();
+ string repoPath = SandboxMergeTestRepo();
using (var repo = new Repository(repoPath))
{
Commit commitToMerge = repo.Branches["fast_forward"].Tip;
@@ -413,7 +413,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void FastForwardMergeReportsCheckoutNotifications()
{
- string repoPath = CloneMergeTestRepo();
+ string repoPath = SandboxMergeTestRepo();
using (var repo = new Repository(repoPath))
{
Commit commitToMerge = repo.Branches["fast_forward"].Tip;
@@ -446,7 +446,7 @@ namespace LibGit2Sharp.Tests
// but the merge will fail with conflicts if this
// change is not detected as a rename.
- string repoPath = CloneMergeTestRepo();
+ string repoPath = SandboxMergeTestRepo();
using (var repo = new Repository(repoPath))
{
Branch currentBranch = repo.Checkout("rename_source");
@@ -463,7 +463,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void FastForwardNonFastForwardableMergeThrows()
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
Commit commitToMerge = repo.Branches["normal_merge"].Tip;
@@ -474,7 +474,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanForceFastForwardMergeThroughConfig()
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("merge.ff", "only");
@@ -487,7 +487,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanMergeAndNotCommit()
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
Commit commitToMerge = repo.Branches["normal_merge"].Tip;
@@ -508,7 +508,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanForceNonFastForwardMerge()
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
Commit commitToMerge = repo.Branches["fast_forward"].Tip;
@@ -524,7 +524,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanForceNonFastForwardMergeThroughConfig()
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("merge.ff", "false");
@@ -542,7 +542,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void VerifyUpToDateMerge()
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
Commit commitToMerge = repo.Branches["master"].Tip;
@@ -562,7 +562,7 @@ namespace LibGit2Sharp.Tests
[InlineData("fast_forward", FastForwardStrategy.Default, MergeStatus.FastForward)]
public void CanMergeCommittish(string committish, FastForwardStrategy strategy, MergeStatus expectedMergeStatus)
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
MergeResult result = repo.Merge(committish, Constants.Signature, new MergeOptions() { FastForwardStrategy = strategy });
@@ -585,7 +585,7 @@ namespace LibGit2Sharp.Tests
// due to merge conflicts.
string committishToMerge = "fast_forward";
- using (var repo = new Repository(CloneMergeTestRepo()))
+ using (var repo = new Repository(SandboxMergeTestRepo()))
{
Touch(repo.Info.WorkingDirectory, "b.txt", "this is an alternate change");
@@ -606,7 +606,7 @@ namespace LibGit2Sharp.Tests
const string conflictFile = "a.txt";
const string conflictBranchName = "conflicts";
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
Branch branch = repo.Branches[conflictBranchName];
@@ -657,7 +657,7 @@ namespace LibGit2Sharp.Tests
const string conflictFile = "a.txt";
const string conflictBranchName = "conflicts";
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = InitIsolatedRepository(path))
{
Branch branch = repo.Branches[conflictBranchName];
@@ -709,7 +709,7 @@ namespace LibGit2Sharp.Tests
[InlineData("fast_forward", FastForwardStrategy.Default, MergeStatus.FastForward)]
public void CanMergeBranch(string branchName, FastForwardStrategy strategy, MergeStatus expectedMergeStatus)
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
Branch branch = repo. Branches[branchName];
@@ -723,7 +723,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanMergeIntoOrphanedBranch()
{
- string path = CloneMergeTestRepo();
+ string path = SandboxMergeTestRepo();
using (var repo = new Repository(path))
{
repo.Refs.Add("HEAD", "refs/heads/orphan", true);
diff --git a/LibGit2Sharp.Tests/NoteFixture.cs b/LibGit2Sharp.Tests/NoteFixture.cs
index ad2e6604..d38f6723 100644
--- a/LibGit2Sharp.Tests/NoteFixture.cs
+++ b/LibGit2Sharp.Tests/NoteFixture.cs
@@ -110,7 +110,7 @@ namespace LibGit2Sharp.Tests
{
var expectedNamespaces = new[] { "Just Note, don't you understand?\n", "Nope\n", "Not Nope, Note!\n" };
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var commit = repo.Lookup<Commit>("4a202b346bb0fb0db7eff3cffeb3c70babbd2045");
@@ -127,7 +127,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddANoteOnAGitObject()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var commit = repo.Lookup<Commit>("9fd738e8f7967c078dceed8190330fc8648ee56a");
@@ -144,7 +144,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CreatingANoteWhichAlreadyExistsOverwritesThePreviousNote()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var commit = repo.Lookup<Commit>("5b5b025afb0b4c913b4c338a42934a3863bf3644");
@@ -165,7 +165,7 @@ namespace LibGit2Sharp.Tests
{
string configPath = CreateConfigurationWithDummyUser(Constants.Signature);
var options = new RepositoryOptions { GlobalConfigurationLocation = configPath };
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path, options))
{
@@ -185,7 +185,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCompareTwoUniqueNotes()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var commit = repo.Lookup<Commit>("9fd738e8f7967c078dceed8190330fc8648ee56a");
@@ -220,7 +220,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveANoteFromAGitObject()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var commit = repo.Lookup<Commit>("8496071c1b46c854b31185ea97743be6a8774479");
@@ -248,7 +248,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RemovingANonExistingNoteDoesntThrow()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var commit = repo.Lookup<Commit>("5b5b025afb0b4c913b4c338a42934a3863bf3644");
@@ -262,7 +262,7 @@ namespace LibGit2Sharp.Tests
{
string configPath = CreateConfigurationWithDummyUser(Constants.Signature);
RepositoryOptions options = new RepositoryOptions() { GlobalConfigurationLocation = configPath };
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path, options))
{
diff --git a/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs b/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs
index f26ba710..e78a4243 100644
--- a/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs
+++ b/LibGit2Sharp.Tests/ObjectDatabaseFixture.cs
@@ -202,7 +202,7 @@ namespace LibGit2Sharp.Tests
[InlineData("1")]
public void CanCreateATreeByAlteringAnExistingOne(string targetPath)
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var blob = repo.Lookup<Blob>(new ObjectId("a8233120f6ad708f843d861ce2b7228ec4e3dec6"));
@@ -218,7 +218,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateATreeByRemovingEntriesFromExistingOne()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
TreeDefinition td = TreeDefinition.From(repo.Head.Tip.Tree)
@@ -239,7 +239,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RemovingANonExistingEntryFromATreeDefinitionHasNoSideEffect()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tree head = repo.Head.Tip.Tree;
@@ -275,7 +275,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanReplaceAnExistingTreeWithAnotherPersitedTree()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
TreeDefinition td = TreeDefinition.From(repo.Head.Tip.Tree);
@@ -296,7 +296,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateATreeContainingABlobFromAFileInTheWorkingDirectory()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.Equal(FileStatus.Nonexistent, repo.RetrieveStatus("hello.txt"));
@@ -328,7 +328,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateATreeContainingAGitLinkFromAnUntrackedSubmoduleInTheWorkingDirectory()
{
- string path = CloneSubmoduleTestRepo();
+ string path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
const string submodulePath = "sm_added_and_uncommited";
@@ -394,7 +394,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateATreeFromIndex()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
@@ -416,7 +416,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateACommit()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Branch head = repo.Head;
@@ -456,7 +456,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateATagAnnotationPointingToAGitObject()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var blob = repo.Head.Tip["README"].Target as Blob;
@@ -549,7 +549,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateATagAnnotationWithAnEmptyMessage()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var tagAnnotation = repo.ObjectDatabase.CreateTagAnnotation(
@@ -621,7 +621,7 @@ namespace LibGit2Sharp.Tests
* dea509d097ce692e167dfc6a48a7a280cc5e877e
*/
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.Config.Set("core.abbrev", 4);
diff --git a/LibGit2Sharp.Tests/OdbBackendFixture.cs b/LibGit2Sharp.Tests/OdbBackendFixture.cs
index 161dcb93..2ca40a4c 100644
--- a/LibGit2Sharp.Tests/OdbBackendFixture.cs
+++ b/LibGit2Sharp.Tests/OdbBackendFixture.cs
@@ -188,7 +188,7 @@ namespace LibGit2Sharp.Tests
* dea509d097ce692e167dfc6a48a7a280cc5e877e
*/
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.ObjectDatabase.AddBackend(new MockOdbBackend(), 5);
diff --git a/LibGit2Sharp.Tests/PushFixture.cs b/LibGit2Sharp.Tests/PushFixture.cs
index d6b906ba..492602a8 100644
--- a/LibGit2Sharp.Tests/PushFixture.cs
+++ b/LibGit2Sharp.Tests/PushFixture.cs
@@ -17,7 +17,7 @@ namespace LibGit2Sharp.Tests
{
var scd = BuildSelfCleaningDirectory();
- string originalRepoPath = CloneBareTestRepo();
+ string originalRepoPath = SandboxBareTestRepo();
string clonedRepoPath = Repository.Clone(originalRepoPath, scd.DirectoryPath);
using (var originalRepo = new Repository(originalRepoPath))
diff --git a/LibGit2Sharp.Tests/RefSpecFixture.cs b/LibGit2Sharp.Tests/RefSpecFixture.cs
index 6e6cbd60..1473ac70 100644
--- a/LibGit2Sharp.Tests/RefSpecFixture.cs
+++ b/LibGit2Sharp.Tests/RefSpecFixture.cs
@@ -11,7 +11,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCountRefSpecs()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -22,7 +22,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanIterateOverRefSpecs()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -39,7 +39,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void FetchAndPushRefSpecsComposeRefSpecs()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -53,7 +53,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanReadRefSpecDetails()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -73,7 +73,7 @@ namespace LibGit2Sharp.Tests
[InlineData(new string[0], new string[] { "refs/ghi:refs/jkl/mno" })]
public void CanReplaceRefSpecs(string[] newFetchRefSpecs, string[] newPushRefSpecs)
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -103,7 +103,7 @@ namespace LibGit2Sharp.Tests
{
var fetchRefSpecs = new string[] { "refs/their/heads/*:refs/my/heads/*", "+refs/their/tag:refs/my/tag" };
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -126,7 +126,7 @@ namespace LibGit2Sharp.Tests
{
string newRefSpec = "+refs/heads/test:refs/heads/other-test";
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -150,7 +150,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanClearRefSpecs()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
@@ -178,7 +178,7 @@ namespace LibGit2Sharp.Tests
[InlineData("refs/ whitespace:refs/test")]
public void SettingInvalidRefSpecsThrows(string refSpec)
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = InitIsolatedRepository(path))
{
var remote = repo.Network.Remotes["origin"];
diff --git a/LibGit2Sharp.Tests/ReferenceFixture.cs b/LibGit2Sharp.Tests/ReferenceFixture.cs
index c3c71a83..2303e34e 100644
--- a/LibGit2Sharp.Tests/ReferenceFixture.cs
+++ b/LibGit2Sharp.Tests/ReferenceFixture.cs
@@ -21,7 +21,7 @@ namespace LibGit2Sharp.Tests
{
const string name = "refs/heads/unit_test";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -46,7 +46,7 @@ namespace LibGit2Sharp.Tests
const string name = "refs/heads/extendedShaSyntaxRulz";
const string logMessage = "Create new ref";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -70,7 +70,7 @@ namespace LibGit2Sharp.Tests
{
const string name = "refs/heads/extendedShaSyntaxRulz";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Assert.Throws<LibGit2SharpException>(() => repo.Refs.Add(name, "master^42"));
@@ -83,7 +83,7 @@ namespace LibGit2Sharp.Tests
const string name = "refs/heads/unit_test";
const string target = "refs/heads/master";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var newRef = (SymbolicReference)repo.Refs.Add(name, target);
@@ -99,7 +99,7 @@ namespace LibGit2Sharp.Tests
const string target = "refs/heads/master";
const string logMessage = "unit_test reference init";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -126,7 +126,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void BlindlyCreatingADirectReferenceOverAnExistingOneThrows()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Assert.Throws<NameConflictException>(() => repo.Refs.Add("refs/heads/master", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644"));
@@ -136,7 +136,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void BlindlyCreatingASymbolicReferenceOverAnExistingOneThrows()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Assert.Throws<NameConflictException>(() => repo.Refs.Add("HEAD", "refs/heads/br2"));
@@ -150,7 +150,7 @@ namespace LibGit2Sharp.Tests
const string target = "4c062a6361ae6959e06292c1fa5e2822d9c96345";
const string logMessage = "Create new ref";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -177,7 +177,7 @@ namespace LibGit2Sharp.Tests
const string target = "refs/heads/br2";
const string logMessage = "Create new ref";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -237,7 +237,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveAReference()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.Refs.Remove("refs/heads/packed");
@@ -247,7 +247,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveANonExistingReference()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string unknown = "refs/heads/dahlbyk/has/hawkeyes";
@@ -261,7 +261,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void ARemovedReferenceCannotBeLookedUp()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string refName = "refs/heads/test";
@@ -274,7 +274,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RemovingAReferenceDecreasesTheRefsCount()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string refName = "refs/heads/test";
@@ -313,7 +313,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanListAllReferencesEvenCorruptedOnes()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
CreateCorruptedDeadBeefHead(repo.Info.Path);
@@ -409,7 +409,7 @@ namespace LibGit2Sharp.Tests
public void CanUpdateTargetOfADirectReference()
{
const string masterRef = "refs/heads/master";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
string sha = repo.Refs["refs/heads/test"].ResolveToDirectReference().Target.Sha;
@@ -429,7 +429,7 @@ namespace LibGit2Sharp.Tests
public void CanUpdateTargetOfADirectReferenceWithAnAbbreviatedSha()
{
const string masterRef = "refs/heads/master";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
string sha = repo.Refs["refs/heads/test"].ResolveToDirectReference().Target.Sha;
@@ -449,7 +449,7 @@ namespace LibGit2Sharp.Tests
public void CanUpdateTargetOfASymbolicReference()
{
const string name = "refs/heads/unit_test";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var newRef = (SymbolicReference)repo.Refs.Add(name, "refs/heads/master");
@@ -467,7 +467,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUpdateHeadWithARevparseSpec()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Branch test = repo.Branches["test"];
@@ -485,7 +485,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUpdateHeadWithEitherAnObjectIdOrAReference()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -522,7 +522,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUpdateTargetOfADirectReferenceWithARevparseSpec()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
EnableRefLog(repo);
@@ -553,7 +553,7 @@ namespace LibGit2Sharp.Tests
public void UpdatingADirectRefWithSymbolFails()
{
const string name = "refs/heads/unit_test";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var newRef = (SymbolicReference)repo.Refs.Add(name, "refs/heads/master");
@@ -570,7 +570,7 @@ namespace LibGit2Sharp.Tests
public void CanUpdateTargetOfADirectReferenceWithAShortReferenceNameAsARevparseSpec()
{
const string masterRef = "refs/heads/master";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Reference updatedMaster = repo.Refs.UpdateTarget(masterRef, "heads/test");
@@ -603,7 +603,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRenameAReferenceToADeeperReferenceHierarchy()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string newName = "refs/tags/test/deep";
@@ -617,7 +617,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRenameAReferenceToAUpperReferenceHierarchy()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string newName = "refs/heads/o/sole";
@@ -633,7 +633,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRenameAReferenceToADifferentReferenceHierarchy()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string oldName = "refs/tags/test";
@@ -665,7 +665,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRenameAndOverWriteAExistingReference()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string oldName = "refs/heads/packed";
@@ -690,7 +690,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RenamingAReferenceDoesNotDecreaseTheRefsCount()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string oldName = "refs/tags/test";
@@ -712,7 +712,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanLookupARenamedReference()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string oldName = "refs/tags/test";
@@ -759,7 +759,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUpdateTheTargetOfASymbolicReferenceWithAnotherSymbolicReference()
{
- string repoPath = CloneBareTestRepo();
+ string repoPath = SandboxBareTestRepo();
using (var repo = new Repository(repoPath))
{
diff --git a/LibGit2Sharp.Tests/ReflogFixture.cs b/LibGit2Sharp.Tests/ReflogFixture.cs
index 155ea5a7..d60ec399 100644
--- a/LibGit2Sharp.Tests/ReflogFixture.cs
+++ b/LibGit2Sharp.Tests/ReflogFixture.cs
@@ -112,7 +112,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CommitOnDetachedHeadShouldInsertReflogEntry()
{
- string repoPath = CloneStandardTestRepo();
+ string repoPath = SandboxStandardTestRepo();
using (var repo = new Repository(repoPath))
{
diff --git a/LibGit2Sharp.Tests/RemoteFixture.cs b/LibGit2Sharp.Tests/RemoteFixture.cs
index 00d15a99..a624ede6 100644
--- a/LibGit2Sharp.Tests/RemoteFixture.cs
+++ b/LibGit2Sharp.Tests/RemoteFixture.cs
@@ -53,7 +53,7 @@ namespace LibGit2Sharp.Tests
[InlineData(TagFetchMode.None)]
public void CanSetTagFetchMode(TagFetchMode tagFetchMode)
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string name = "upstream";
@@ -73,7 +73,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanSetRemoteUrl()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string name = "upstream";
@@ -94,7 +94,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCheckEqualityOfRemote()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Remote oneOrigin = repo.Network.Remotes["origin"];
@@ -116,7 +116,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CreatingANewRemoteAddsADefaultRefSpec()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string name = "upstream";
@@ -139,7 +139,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddANewRemoteWithAFetchRefSpec()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string name = "pull-requests";
@@ -194,7 +194,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CreatingARemoteAddsADefaultFetchRefSpec()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var remote = repo.Network.Remotes.Add("one", "http://github.com/up/stream");
@@ -205,7 +205,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanCreateARemoteWithASpecifiedFetchRefSpec()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var remote = repo.Network.Remotes.Add("two", "http://github.com/up/stream", "+refs/heads/*:refs/remotes/grmpf/*");
@@ -216,7 +216,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanDeleteExistingRemote()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.NotNull(repo.Network.Remotes["origin"]);
@@ -241,7 +241,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRenameExistingRemote()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.NotNull(repo.Network.Remotes["origin"]);
@@ -273,7 +273,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void ReportsRemotesWithNonDefaultRefSpecs()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.NotNull(repo.Network.Remotes["origin"]);
@@ -295,7 +295,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void DoesNotReportRemotesWithAlreadyExistingRefSpec()
{
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.NotNull(repo.Network.Remotes["origin"]);
@@ -318,7 +318,7 @@ namespace LibGit2Sharp.Tests
const string name = "upstream";
const string url = "https://github.com/libgit2/libgit2sharp.git";
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.NotNull(repo.Network.Remotes["origin"]);
diff --git a/LibGit2Sharp.Tests/RemoveFixture.cs b/LibGit2Sharp.Tests/RemoveFixture.cs
index fb9f122e..02243cad 100644
--- a/LibGit2Sharp.Tests/RemoveFixture.cs
+++ b/LibGit2Sharp.Tests/RemoveFixture.cs
@@ -47,7 +47,7 @@ namespace LibGit2Sharp.Tests
public void CanRemoveAnUnalteredFileFromTheIndexWithoutRemovingItFromTheWorkingDirectory(
bool removeFromWorkdir, string filename, bool throws, FileStatus initialStatus, bool existsBeforeRemove, bool existsAfterRemove, FileStatus lastStatus)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -83,7 +83,7 @@ namespace LibGit2Sharp.Tests
{
const string filename = "modified_staged_file.txt";
- var path = CloneStandardTestRepo();
+ var path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
string fullpath = Path.Combine(repo.Info.WorkingDirectory, filename);
@@ -101,7 +101,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveAFolderThroughUsageOfPathspecsForNewlyAddedFiles()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Stage(Touch(repo.Info.WorkingDirectory, "2/subdir1/2.txt", "whone"));
@@ -122,7 +122,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveAFolderThroughUsageOfPathspecsForFilesAlreadyInTheIndexAndInTheHEAD()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
diff --git a/LibGit2Sharp.Tests/RepositoryFixture.cs b/LibGit2Sharp.Tests/RepositoryFixture.cs
index c74804ff..5654ccbd 100644
--- a/LibGit2Sharp.Tests/RepositoryFixture.cs
+++ b/LibGit2Sharp.Tests/RepositoryFixture.cs
@@ -536,7 +536,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanDetectIfTheHeadIsOrphaned()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
string branchName = repo.Head.CanonicalName;
@@ -554,7 +554,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void QueryingTheRemoteForADetachedHeadBranchReturnsNull()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Checkout(repo.Head.Tip.Sha, new CheckoutOptions() { CheckoutModifiers = CheckoutModifiers.Force });
diff --git a/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs b/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs
index e8177a29..aeb2708a 100644
--- a/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs
+++ b/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs
@@ -53,7 +53,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanProvideADifferentWorkDirToAStandardRepo()
{
- var path1 = CloneStandardTestRepo();
+ var path1 = SandboxStandardTestRepo();
using (var repo = new Repository(path1))
{
Assert.Equal(FileStatus.Unaltered, repo.RetrieveStatus("1/branch_file.txt"));
@@ -61,7 +61,7 @@ namespace LibGit2Sharp.Tests
var options = new RepositoryOptions { WorkingDirectoryPath = newWorkdir };
- var path2 = CloneStandardTestRepo();
+ var path2 = SandboxStandardTestRepo();
using (var repo = new Repository(path2, options))
{
Assert.Equal(FileStatus.Missing, repo.RetrieveStatus("1/branch_file.txt"));
@@ -71,7 +71,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanProvideADifferentIndexToAStandardRepo()
{
- var path1 = CloneStandardTestRepo();
+ var path1 = SandboxStandardTestRepo();
using (var repo = new Repository(path1))
{
Assert.Equal(FileStatus.Untracked, repo.RetrieveStatus("new_untracked_file.txt"));
@@ -85,7 +85,7 @@ namespace LibGit2Sharp.Tests
var options = new RepositoryOptions { IndexPath = newIndex };
- var path2 = CloneStandardTestRepo();
+ var path2 = SandboxStandardTestRepo();
using (var repo = new Repository(path2, options))
{
Assert.Equal(FileStatus.Added, repo.RetrieveStatus("new_untracked_file.txt"));
@@ -102,7 +102,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanSneakAdditionalCommitsIntoAStandardRepoWithoutAlteringTheWorkdirOrTheIndex()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Branch head = repo.Head;
diff --git a/LibGit2Sharp.Tests/ResetHeadFixture.cs b/LibGit2Sharp.Tests/ResetHeadFixture.cs
index c45e54b9..1dec4238 100644
--- a/LibGit2Sharp.Tests/ResetHeadFixture.cs
+++ b/LibGit2Sharp.Tests/ResetHeadFixture.cs
@@ -25,7 +25,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void SoftResetToTheHeadOfARepositoryDoesNotChangeTheTargetOfTheHead()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Branch oldHead = repo.Head;
@@ -39,7 +39,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void SoftResetToAParentCommitChangesTheTargetOfTheHead()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var headCommit = repo.Head.Tip;
@@ -53,7 +53,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void SoftResetSetsTheHeadToTheDereferencedCommitOfAChainedTag()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag tag = repo.Tags["test"];
@@ -222,7 +222,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void HardResetUpdatesTheContentOfTheWorkingDirectory()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var names = new DirectoryInfo(repo.Info.WorkingDirectory).GetFileSystemInfos().Select(fsi => fsi.Name).ToList();
diff --git a/LibGit2Sharp.Tests/ResetIndexFixture.cs b/LibGit2Sharp.Tests/ResetIndexFixture.cs
index ebfdd20f..333b3403 100644
--- a/LibGit2Sharp.Tests/ResetIndexFixture.cs
+++ b/LibGit2Sharp.Tests/ResetIndexFixture.cs
@@ -61,7 +61,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void ResetTheIndexWithTheHeadUnstagesEverything()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
RepositoryStatus oldStatus = repo.RetrieveStatus();
@@ -82,7 +82,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetTheIndexToTheContentOfACommitWithCommittishAsArgument()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset("be3563a");
@@ -100,7 +100,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetTheIndexToTheContentOfACommitWithCommitAsArgument()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(repo.Lookup<Commit>("be3563a"));
@@ -118,7 +118,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetTheIndexToASubsetOfTheContentOfACommitWithCommittishAsArgument()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset("5b5b025", new[]{ "new.txt" });
@@ -131,7 +131,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetTheIndexToASubsetOfTheContentOfACommitWithCommitAsArgumentAndLaxUnmatchedExplicitPathsValidation()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Reset(repo.Lookup<Commit>("5b5b025"), new[] { "new.txt", "non-existent-path-28.txt" },
@@ -145,7 +145,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void ResettingTheIndexToASubsetOfTheContentOfACommitWithCommitAsArgumentAndStrictUnmatchedPathspecsValidationThrows()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
Assert.Throws<UnmatchedPathException>(() =>
repo.Reset(repo.Lookup<Commit>("5b5b025"), new[] { "new.txt", "non-existent-path-28.txt" }, new ExplicitPathsOptions()));
@@ -155,7 +155,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetTheIndexWhenARenameExists()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Move("branch_file.txt", "renamed_branch_file.txt");
repo.Reset(repo.Lookup<Commit>("32eab9c"));
@@ -168,7 +168,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetSourceOfARenameInIndex()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Move("branch_file.txt", "renamed_branch_file.txt");
@@ -189,7 +189,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanResetTargetOfARenameInIndex()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Move("branch_file.txt", "renamed_branch_file.txt");
diff --git a/LibGit2Sharp.Tests/RevertFixture.cs b/LibGit2Sharp.Tests/RevertFixture.cs
index 7f60431f..5c52cc6c 100644
--- a/LibGit2Sharp.Tests/RevertFixture.cs
+++ b/LibGit2Sharp.Tests/RevertFixture.cs
@@ -17,7 +17,7 @@ namespace LibGit2Sharp.Tests
const string revertBranchName = "refs/heads/revert";
const string revertedFile = "a.txt";
- string path = CloneRevertTestRepo();
+ string path = SandboxRevertTestRepo();
using (var repo = new Repository(path))
{
// Checkout the revert branch.
@@ -64,7 +64,7 @@ namespace LibGit2Sharp.Tests
const string revertBranchName = "refs/heads/revert";
const string revertedFile = "a.txt";
- string path = CloneRevertTestRepo();
+ string path = SandboxRevertTestRepo();
using (var repo = new Repository(path))
{
string modifiedFileFullPath = Path.Combine(repo.Info.WorkingDirectory, revertedFile);
@@ -108,7 +108,7 @@ namespace LibGit2Sharp.Tests
// and the file whose contents we expect to be reverted.
const string revertBranchName = "refs/heads/revert";
- string path = CloneRevertTestRepo();
+ string path = SandboxRevertTestRepo();
using (var repo = new Repository(path))
{
// Checkout the revert branch.
@@ -146,7 +146,7 @@ namespace LibGit2Sharp.Tests
const string revertBranchName = "refs/heads/revert";
const string conflictedFilePath = "a.txt";
- string path = CloneRevertTestRepo();
+ string path = SandboxRevertTestRepo();
using (var repo = new Repository(path))
{
// Checkout the revert branch.
@@ -198,7 +198,7 @@ namespace LibGit2Sharp.Tests
{
const string revertBranchName = "refs/heads/revert";
- string repoPath = CloneRevertTestRepo();
+ string repoPath = SandboxRevertTestRepo();
using (var repo = new Repository(repoPath))
{
// Checkout the revert branch.
@@ -223,7 +223,7 @@ namespace LibGit2Sharp.Tests
{
const string revertBranchName = "refs/heads/revert";
- string repoPath = CloneRevertTestRepo();
+ string repoPath = SandboxRevertTestRepo();
using (var repo = new Repository(repoPath))
{
// Checkout the revert branch.
@@ -263,7 +263,7 @@ namespace LibGit2Sharp.Tests
const string expectedBlobId = "0ff3bbb9c8bba2291654cd64067fa417ff54c508";
const string modifiedFilePath = "d_renamed.txt";
- string repoPath = CloneRevertTestRepo();
+ string repoPath = SandboxRevertTestRepo();
using (var repo = new Repository(repoPath))
{
Branch currentBranch = repo.Checkout(revertBranchName);
@@ -320,7 +320,7 @@ namespace LibGit2Sharp.Tests
const string revertBranchName = "refs/heads/revert_merge";
const string commitIdToRevert = "2747045";
- string repoPath = CloneRevertTestRepo();
+ string repoPath = SandboxRevertTestRepo();
using (var repo = new Repository(repoPath))
{
Branch branch = repo.Checkout(revertBranchName);
@@ -379,7 +379,7 @@ namespace LibGit2Sharp.Tests
const string revertBranchName = "refs/heads/revert_merge";
const string commitIdToRevert = "2747045";
- string repoPath = CloneRevertTestRepo();
+ string repoPath = SandboxRevertTestRepo();
using (var repo = new Repository(repoPath))
{
Branch branch = repo.Checkout(revertBranchName);
@@ -400,7 +400,7 @@ namespace LibGit2Sharp.Tests
// The branch name to perform the revert on
const string revertBranchName = "refs/heads/revert";
- string path = CloneRevertTestRepo();
+ string path = SandboxRevertTestRepo();
using (var repo = new Repository(path))
{
// Checkout the revert branch.
@@ -441,7 +441,7 @@ namespace LibGit2Sharp.Tests
// The branch name to perform the revert on
const string revertBranchName = "refs/heads/revert";
- string path = CloneRevertTestRepo();
+ string path = SandboxRevertTestRepo();
using (var repo = new Repository(path))
{
// Checkout the revert branch.
diff --git a/LibGit2Sharp.Tests/StageFixture.cs b/LibGit2Sharp.Tests/StageFixture.cs
index a6173719..1647c440 100644
--- a/LibGit2Sharp.Tests/StageFixture.cs
+++ b/LibGit2Sharp.Tests/StageFixture.cs
@@ -18,7 +18,7 @@ namespace LibGit2Sharp.Tests
[InlineData("new_tracked_file.txt", FileStatus.Added, true, FileStatus.Added, true, 0)]
public void CanStage(string relativePath, FileStatus currentStatus, bool doesCurrentlyExistInTheIndex, FileStatus expectedStatusOnceStaged, bool doesExistInTheIndexOnceStaged, int expectedIndexCountVariation)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -36,7 +36,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStageTheUpdationOfAStagedFile()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -106,7 +106,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStageTheRemovalOfAStagedFile()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -132,7 +132,7 @@ namespace LibGit2Sharp.Tests
[InlineData("!bang/unit_test.txt")]
public void CanStageANewFileInAPersistentManner(string filename)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.Equal(FileStatus.Nonexistent, repo.RetrieveStatus(filename));
@@ -167,7 +167,7 @@ namespace LibGit2Sharp.Tests
//InconclusiveIf(() => IsFileSystemCaseSensitive && ignorecase,
// "Skipping 'ignorecase = true' test on case-sensitive file system.");
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
@@ -204,7 +204,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStageANewFileWithARelativePathContainingNativeDirectorySeparatorCharacters()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -227,7 +227,7 @@ namespace LibGit2Sharp.Tests
public void StagingANewFileWithAFullPathWhichEscapesOutOfTheWorkingDirThrows()
{
SelfCleaningDirectory scd = BuildSelfCleaningDirectory();
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
string fullPath = Touch(scd.RootedDirectoryPath, "unit_test.txt", "some contents");
@@ -276,7 +276,7 @@ namespace LibGit2Sharp.Tests
[InlineData("new_*file.txt", 1)]
public void CanStageWithPathspec(string relativePath, int expectedIndexCountVariation)
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
int count = repo.Index.Count;
@@ -289,7 +289,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStageWithMultiplePathspecs()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
int count = repo.Index.Count;
@@ -304,7 +304,7 @@ namespace LibGit2Sharp.Tests
[InlineData("ignored_folder/file.txt")]
public void CanIgnoreIgnoredPaths(string path)
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
Touch(repo.Info.WorkingDirectory, ".gitignore", "ignored_file.txt\nignored_folder/\n");
Touch(repo.Info.WorkingDirectory, path, "This file is ignored.");
@@ -320,7 +320,7 @@ namespace LibGit2Sharp.Tests
[InlineData("ignored_folder/file.txt")]
public void CanStageIgnoredPaths(string path)
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
Touch(repo.Info.WorkingDirectory, ".gitignore", "ignored_file.txt\nignored_folder/\n");
Touch(repo.Info.WorkingDirectory, path, "This file is ignored.");
diff --git a/LibGit2Sharp.Tests/StashFixture.cs b/LibGit2Sharp.Tests/StashFixture.cs
index 14fc3844..cae222f9 100644
--- a/LibGit2Sharp.Tests/StashFixture.cs
+++ b/LibGit2Sharp.Tests/StashFixture.cs
@@ -12,7 +12,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CannotAddStashAgainstBareRepository()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var stasher = Constants.Signature;
@@ -24,7 +24,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAndRemoveStash()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var stasher = Constants.Signature;
@@ -83,7 +83,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void AddingAStashWithNoMessageGeneratesADefaultOne()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var stasher = Constants.Signature;
@@ -102,7 +102,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void AddStashWithBadParamsShouldThrows()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.Throws<ArgumentNullException>(() => repo.Stashes.Add(default(Signature), options: StashModifiers.Default));
@@ -112,7 +112,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void StashingAgainstCleanWorkDirShouldReturnANullStash()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var stasher = Constants.Signature;
@@ -129,7 +129,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStashWithoutOptions()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var stasher = Constants.Signature;
@@ -158,7 +158,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStashAndKeepIndex()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var stasher = Constants.Signature;
@@ -179,7 +179,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStashIgnoredFiles()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string gitIgnore = ".gitignore";
@@ -209,7 +209,7 @@ namespace LibGit2Sharp.Tests
[InlineData(-42)]
public void RemovingStashWithBadParamShouldThrow(int badIndex)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Assert.Throws<ArgumentException>(() => repo.Stashes.Remove(badIndex));
@@ -219,7 +219,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanGetStashByIndexer()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
var stasher = Constants.Signature;
diff --git a/LibGit2Sharp.Tests/StatusFixture.cs b/LibGit2Sharp.Tests/StatusFixture.cs
index 35cfddda..df24393c 100644
--- a/LibGit2Sharp.Tests/StatusFixture.cs
+++ b/LibGit2Sharp.Tests/StatusFixture.cs
@@ -26,7 +26,7 @@ namespace LibGit2Sharp.Tests
[InlineData(StatusShowOption.IndexOnly, FileStatus.Nonexistent)]
public void CanLimitStatusToWorkDirOnly(StatusShowOption show, FileStatus expected)
{
- var clone = CloneStandardTestRepo();
+ var clone = SandboxStandardTestRepo();
using (var repo = new Repository(clone))
{
@@ -43,7 +43,7 @@ namespace LibGit2Sharp.Tests
[InlineData(StatusShowOption.IndexOnly, FileStatus.Added)]
public void CanLimitStatusToIndexOnly(StatusShowOption show, FileStatus expected)
{
- var clone = CloneStandardTestRepo();
+ var clone = SandboxStandardTestRepo();
using (var repo = new Repository(clone))
{
@@ -81,7 +81,7 @@ namespace LibGit2Sharp.Tests
[InlineData("dir!/file.txt")]
public void CanRetrieveTheStatusOfAnUntrackedFile(string filePath)
{
- var clone = CloneStandardTestRepo();
+ var clone = SandboxStandardTestRepo();
using (var repo = new Repository(clone))
{
@@ -104,7 +104,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveTheStatusOfTheWholeWorkingDirectory()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string file = "modified_staged_file.txt";
@@ -148,7 +148,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveTheStatusOfRenamedFilesInWorkDir()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Touch(repo.Info.WorkingDirectory, "old_name.txt",
@@ -177,7 +177,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveTheStatusOfRenamedFilesInIndex()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
File.Move(
@@ -315,7 +315,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectives()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
string relativePath = Path.Combine("1", "look-ma.txt");
@@ -457,7 +457,7 @@ namespace LibGit2Sharp.Tests
{
char dirSep = Path.DirectorySeparatorChar;
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Touch(repo.Info.WorkingDirectory, "bin/look-ma.txt", "I'm going to be ignored!");
@@ -490,7 +490,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveStatusOfFilesInSubmodule()
{
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
string[] expected = new string[] {
@@ -510,7 +510,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanExcludeStatusOfFilesInSubmodule()
{
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
string[] expected = new string[] {
@@ -525,7 +525,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveTheStatusOfARelativeWorkingDirectory()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string file = "just_a_dir/other.txt";
@@ -547,7 +547,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveTheStatusOfMultiplePathSpec()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string file = "just_a_dir/other.txt";
@@ -565,7 +565,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRetrieveTheStatusOfAGlobSpec()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
const string file = "just_a_dir/other.txt";
diff --git a/LibGit2Sharp.Tests/SubmoduleFixture.cs b/LibGit2Sharp.Tests/SubmoduleFixture.cs
index e72b7b2e..e66961dd 100644
--- a/LibGit2Sharp.Tests/SubmoduleFixture.cs
+++ b/LibGit2Sharp.Tests/SubmoduleFixture.cs
@@ -12,7 +12,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RetrievingSubmoduleForNormalDirectoryReturnsNull()
{
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
var submodule = repo.Submodules["just_a_dir"];
@@ -31,7 +31,7 @@ namespace LibGit2Sharp.Tests
[InlineData("sm_unchanged", SubmoduleStatus.InConfig | SubmoduleStatus.InHead | SubmoduleStatus.InIndex | SubmoduleStatus.InWorkDir)]
public void CanRetrieveTheStatusOfASubmodule(string name, SubmoduleStatus expectedStatus)
{
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
var submodule = repo.Submodules[name];
@@ -55,7 +55,7 @@ namespace LibGit2Sharp.Tests
[InlineData("sm_unchanged", "480095882d281ed676fe5b863569520e54a7d5c0", "480095882d281ed676fe5b863569520e54a7d5c0", "480095882d281ed676fe5b863569520e54a7d5c0")]
public void CanRetrieveTheCommitIdsOfASubmodule(string name, string headId, string indexId, string workDirId)
{
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
var submodule = repo.Submodules[name];
@@ -92,7 +92,7 @@ namespace LibGit2Sharp.Tests
"sm_unchanged",
};
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
var submodules = repo.Submodules.OrderBy(s => s.Name, StringComparer.Ordinal);
@@ -111,7 +111,7 @@ namespace LibGit2Sharp.Tests
{
submodulePath += appendPathSeparator ? Path.DirectorySeparatorChar : default(char?);
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
var submodule = repo.Submodules[submodulePath];
@@ -134,7 +134,7 @@ namespace LibGit2Sharp.Tests
{
submodulePath += appendPathSeparator ? Path.DirectorySeparatorChar : default(char?);
- var path = CloneSubmoduleTestRepo();
+ var path = SandboxSubmoduleTestRepo();
using (var repo = new Repository(path))
{
var submodule = repo.Submodules[submodulePath];
diff --git a/LibGit2Sharp.Tests/TagFixture.cs b/LibGit2Sharp.Tests/TagFixture.cs
index bd008af3..75d2aa94 100644
--- a/LibGit2Sharp.Tests/TagFixture.cs
+++ b/LibGit2Sharp.Tests/TagFixture.cs
@@ -20,7 +20,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddALightWeightTagFromSha()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("i_am_lightweight", commitE90810BSha);
@@ -33,7 +33,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddALightWeightTagFromAGitObject()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
GitObject obj = repo.Lookup(commitE90810BSha);
@@ -48,7 +48,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddALightWeightTagFromAbbreviatedSha()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("i_am_lightweight", commitE90810BSha.Substring(0, 17));
@@ -60,7 +60,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddALightweightTagFromABranchName()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("i_am_lightweight", "refs/heads/master");
@@ -72,7 +72,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddALightweightTagFromARevparseSpec()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("i_am_lightweight", "master^1^2");
@@ -85,7 +85,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAndOverwriteALightweightTag()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("e90810b", commitE90810BSha, true);
@@ -97,7 +97,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddATagWithNameContainingASlash()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string lwTagName = "i/am/deep";
@@ -120,7 +120,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CreatingATagWithNameMatchingAnAlreadyExistingReferenceHierarchyThrows()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.ApplyTag("i/am/deep");
@@ -132,7 +132,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAnAnnotatedTagFromABranchName()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("unit_test", "refs/heads/master", signatureTim, "a new tag");
@@ -144,7 +144,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAnAnnotatedTagFromSha()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("unit_test", tagTestSha, signatureTim, "a new tag");
@@ -158,7 +158,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAnAnnotatedTagFromObject()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
GitObject obj = repo.Lookup(tagTestSha);
@@ -173,7 +173,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAnAnnotatedTagFromARevparseSpec()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("unit_test", "master^1^2", signatureTim, "a new tag");
@@ -187,7 +187,7 @@ namespace LibGit2Sharp.Tests
// Ported from cgit (https://github.com/git/git/blob/1c08bf50cfcf924094eca56c2486a90e2bf1e6e2/t/t7004-tag.sh#L359)
public void CanAddAnAnnotatedTagWithAnEmptyMessage()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.ApplyTag("empty-annotated-tag", signatureNtk, string.Empty);
@@ -200,7 +200,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAndOverwriteAnAnnotatedTag()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add("e90810b", tagTestSha, signatureTim, "a new tag", true);
@@ -215,7 +215,7 @@ namespace LibGit2Sharp.Tests
const string tagName = "nullTAGen";
const string tagMessage = "I've been tagged!";
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag newTag = repo.Tags.Add(tagName, commitE90810BSha, signatureNtk, tagMessage);
@@ -275,7 +275,7 @@ namespace LibGit2Sharp.Tests
// Ported from cgit (https://github.com/git/git/blob/1c08bf50cfcf924094eca56c2486a90e2bf1e6e2/t/t7004-tag.sh#L48)
public void CanAddATagForImplicitHead()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag tag = repo.ApplyTag("mytag");
@@ -291,7 +291,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddATagForImplicitHeadInDetachedState()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Checkout(repo.Head.Tip);
@@ -312,7 +312,7 @@ namespace LibGit2Sharp.Tests
// Ported from cgit (https://github.com/git/git/blob/1c08bf50cfcf924094eca56c2486a90e2bf1e6e2/t/t7004-tag.sh#L87)
public void CreatingADuplicateTagThrows()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.ApplyTag("mytag");
@@ -339,7 +339,7 @@ namespace LibGit2Sharp.Tests
// Ported from cgit (https://github.com/git/git/blob/1c08bf50cfcf924094eca56c2486a90e2bf1e6e2/t/t7004-tag.sh#L101)
public void CanAddATagUsingHead()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag tag = repo.ApplyTag("mytag", "HEAD");
@@ -355,7 +355,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddATagPointingToATree()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Commit headCommit = repo.Head.Tip;
@@ -393,7 +393,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddATagPointingToABlob()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
var blob = repo.Lookup<Blob>("a823312");
@@ -411,7 +411,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CreatingALightweightTagPointingToATagAnnotationGeneratesAnAnnotatedTagReusingThePointedAtTagAnnotation()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag annotatedTag = repo.Tags["e90810b"];
@@ -431,7 +431,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanAddAnAnnotatedTagPointingToATagAnnotation()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag annotatedTag = repo.Tags["e90810b"];
@@ -541,7 +541,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveATagThroughItsName()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.Tags.Remove("e90810b");
@@ -551,7 +551,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveATagThroughItsCanonicalName()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
repo.Tags.Remove("refs/tags/e90810b");
@@ -561,7 +561,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanRemoveATag()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
Tag tag = repo.Tags["e90810b"];
@@ -572,7 +572,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void ARemovedTagCannotBeLookedUp()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string tagName = "e90810b";
@@ -585,7 +585,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void RemovingATagDecreasesTheTagsCount()
{
- string path = CloneBareTestRepo();
+ string path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
const string tagName = "e90810b";
diff --git a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
index 39c897a4..c3dea962 100644
--- a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
+++ b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
@@ -120,43 +120,43 @@ namespace LibGit2Sharp.Tests.TestHelpers
return new SelfCleaningDirectory(this, path);
}
- protected string CloneBareTestRepo()
+ protected string SandboxBareTestRepo()
{
- return Clone(BareTestRepoPath);
+ return Sandbox(BareTestRepoPath);
}
- protected string CloneStandardTestRepo()
+ protected string SandboxStandardTestRepo()
{
- return Clone(StandardTestRepoWorkingDirPath);
+ return Sandbox(StandardTestRepoWorkingDirPath);
}
- protected string CloneMergedTestRepo()
+ protected string SandboxMergedTestRepo()
{
- return Clone(MergedTestRepoWorkingDirPath);
+ return Sandbox(MergedTestRepoWorkingDirPath);
}
- protected string CloneMergeRenamesTestRepo()
+ protected string SandboxMergeRenamesTestRepo()
{
- return Clone(MergeRenamesTestRepoWorkingDirPath);
+ return Sandbox(MergeRenamesTestRepoWorkingDirPath);
}
- protected string CloneMergeTestRepo()
+ protected string SandboxMergeTestRepo()
{
- return Clone(MergeTestRepoWorkingDirPath);
+ return Sandbox(MergeTestRepoWorkingDirPath);
}
- protected string CloneRevertTestRepo()
+ protected string SandboxRevertTestRepo()
{
- return Clone(RevertTestRepoWorkingDirPath);
+ return Sandbox(RevertTestRepoWorkingDirPath);
}
- public string CloneSubmoduleTestRepo()
+ public string SandboxSubmoduleTestRepo()
{
var submoduleTarget = Path.Combine(ResourcesDirectory.FullName, "submodule_target_wd");
- return Clone(SubmoduleTestRepoWorkingDirPath, submoduleTarget);
+ return Sandbox(SubmoduleTestRepoWorkingDirPath, submoduleTarget);
}
- private string Clone(string sourceDirectoryPath, params string[] additionalSourcePaths)
+ private string Sandbox(string sourceDirectoryPath, params string[] additionalSourcePaths)
{
var scd = BuildSelfCleaningDirectory();
var source = new DirectoryInfo(sourceDirectoryPath);
diff --git a/LibGit2Sharp.Tests/TreeFixture.cs b/LibGit2Sharp.Tests/TreeFixture.cs
index ced6f278..8bb4f87b 100644
--- a/LibGit2Sharp.Tests/TreeFixture.cs
+++ b/LibGit2Sharp.Tests/TreeFixture.cs
@@ -204,7 +204,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanParseSymlinkTreeEntries()
{
- var path = CloneBareTestRepo();
+ var path = SandboxBareTestRepo();
using (var repo = new Repository(path))
{
diff --git a/LibGit2Sharp.Tests/UnstageFixture.cs b/LibGit2Sharp.Tests/UnstageFixture.cs
index a965187b..94d24338 100644
--- a/LibGit2Sharp.Tests/UnstageFixture.cs
+++ b/LibGit2Sharp.Tests/UnstageFixture.cs
@@ -13,7 +13,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void StagingANewVersionOfAFileThenUnstagingItRevertsTheBlobToTheVersionOfHead()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -40,7 +40,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanStageAndUnstageAnIgnoredFile()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
Touch(repo.Info.WorkingDirectory, ".gitignore", "*.ign" + Environment.NewLine);
@@ -69,7 +69,7 @@ namespace LibGit2Sharp.Tests
string relativePath, FileStatus currentStatus, bool doesCurrentlyExistInTheIndex,
FileStatus expectedStatusOnceStaged, bool doesExistInTheIndexOnceStaged, int expectedIndexCountVariation)
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -89,7 +89,7 @@ namespace LibGit2Sharp.Tests
[InlineData("where-am-I.txt", FileStatus.Nonexistent)]
public void UnstagingUnknownPathsWithStrictUnmatchedExplicitPathsValidationThrows(string relativePath, FileStatus currentStatus)
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
Assert.Equal(currentStatus, repo.RetrieveStatus(relativePath));
@@ -102,7 +102,7 @@ namespace LibGit2Sharp.Tests
[InlineData("where-am-I.txt", FileStatus.Nonexistent)]
public void CanUnstageUnknownPathsWithLaxUnmatchedExplicitPathsValidation(string relativePath, FileStatus currentStatus)
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
Assert.Equal(currentStatus, repo.RetrieveStatus(relativePath));
@@ -114,7 +114,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUnstageTheRemovalOfAFile()
{
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
int count = repo.Index.Count;
@@ -159,7 +159,7 @@ namespace LibGit2Sharp.Tests
[InlineData("where-am-I.txt", FileStatus.Nonexistent)]
public void UnstagingUnknownPathsAgainstAnOrphanedHeadWithStrictUnmatchedExplicitPathsValidationThrows(string relativePath, FileStatus currentStatus)
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Refs.UpdateTarget("HEAD", "refs/heads/orphaned");
Assert.True(repo.Info.IsHeadUnborn);
@@ -175,7 +175,7 @@ namespace LibGit2Sharp.Tests
[InlineData("where-am-I.txt", FileStatus.Nonexistent)]
public void CanUnstageUnknownPathsAgainstAnOrphanedHeadWithLaxUnmatchedExplicitPathsValidation(string relativePath, FileStatus currentStatus)
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Refs.UpdateTarget("HEAD", "refs/heads/orphaned");
Assert.True(repo.Info.IsHeadUnborn);
@@ -192,7 +192,7 @@ namespace LibGit2Sharp.Tests
public void UnstagingANewFileWithAFullPathWhichEscapesOutOfTheWorkingDirThrows()
{
SelfCleaningDirectory scd = BuildSelfCleaningDirectory();
- string path = CloneStandardTestRepo();
+ string path = SandboxStandardTestRepo();
using (var repo = new Repository(path))
{
DirectoryInfo di = Directory.CreateDirectory(scd.DirectoryPath);
@@ -237,7 +237,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUnstageSourceOfARename()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Move("branch_file.txt", "renamed_branch_file.txt");
@@ -258,7 +258,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUnstageTargetOfARename()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Move("branch_file.txt", "renamed_branch_file.txt");
@@ -278,7 +278,7 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CanUnstageBothSidesOfARename()
{
- using (var repo = new Repository(CloneStandardTestRepo()))
+ using (var repo = new Repository(SandboxStandardTestRepo()))
{
repo.Move("branch_file.txt", "renamed_branch_file.txt");
repo.Unstage(new string[] { "branch_file.txt", "renamed_branch_file.txt" });