Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Disable creating a commit and deployment from webroot on initial clone.

  • Loading branch information...
commit 8e72b6f046c3046de85f59ab55becee95746f649 1 parent 54fcf8b
@davidfowl davidfowl authored
View
8 Kudu.FunctionalTests/GitRepositoryManagementTests.cs
@@ -438,14 +438,14 @@ public void CloneFromEmptyRepoAndPushShouldDeploy()
var results = appManager.DeploymentManager.GetResultsAsync().Result.ToList();
// Assert
- Assert.Equal(2, results.Count);
+ Assert.Equal(1, results.Count);
KuduAssert.VerifyUrl(helloUrl, "Wow");
}
});
}
[Fact]
- public void CloneFromNewRepoShouldHaveFile()
+ public void CloneFromNewRepoShouldHaveBeEmpty()
{
string repositoryName = "CloneFromNewRepoShouldHaveFile";
string appName = KuduUtils.GetRandomWebsiteName("CloneNew");
@@ -454,7 +454,7 @@ public void CloneFromNewRepoShouldHaveFile()
{
using (var repo = Git.Clone(repositoryName, appManager.GitUrl, createDirectory: true))
{
- Assert.True(repo.FileExists("index.html"));
+ Assert.False(repo.FileExists("index.html"));
}
});
}
@@ -477,7 +477,7 @@ private static void DoClone(string repositoryName, ApplicationManager appManager
{
using (var repo = Git.Clone(repositoryName, appManager.GitUrl, createDirectory: true))
{
- Assert.True(repo.FileExists("index.html"));
+ Assert.False(repo.FileExists("index.html"));
}
}
View
19 Kudu.Services/GitServer/InfoRefsService.cs
@@ -94,15 +94,18 @@ private HttpResponseMessage SmartInfoRefs(string service)
if (service == "upload-pack")
{
- // Initialize the repository from the deployment files (if this is the first commit)
- ChangeSet changeSet = _gitServer.Initialize(_configuration, _deploymentTargetPath);
- _gitServer.AdvertiseUploadPack(memoryStream);
+ //// Initialize the repository from the deployment files (if this is the first commit)
+ //ChangeSet changeSet = _gitServer.Initialize(_configuration, _deploymentTargetPath);
+ //_gitServer.AdvertiseUploadPack(memoryStream);
+
+ //// If we just created the repo, make a 'pseudo' deployment for the initial commit
+ //if (changeSet != null)
+ //{
+ // _deploymentManager.CreateExistingDeployment(changeSet.Id, _configuration.Username);
+ //}
- // If we just created the repo, make a 'pseudo' deployment for the initial commit
- if (changeSet != null)
- {
- _deploymentManager.CreateExistingDeployment(changeSet.Id, _configuration.Username);
- }
+ _gitServer.Initialize(_configuration);
+ _gitServer.AdvertiseUploadPack(memoryStream);
}
else if (service == "receive-pack")
{
Please sign in to comment.
Something went wrong with that request. Please try again.