Skip to content

Commit

Permalink
Infer repo name from server url
Browse files Browse the repository at this point in the history
  • Loading branch information
0x53A committed Jun 7, 2018
1 parent 4eb8a3f commit 1ae6b6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/GitTfs/Commands/Clone.cs
Expand Up @@ -41,7 +41,12 @@ public OptionSet OptionSet

public int Run(string tfsUrl, string tfsRepositoryPath)
{
return Run(tfsUrl, tfsRepositoryPath, Path.GetFileName(tfsRepositoryPath));
string gitRepositoryPath;
if (tfsRepositoryPath == GitTfsConstants.TfsRoot)
gitRepositoryPath = new Uri(tfsUrl).Host;
else
gitRepositoryPath = Path.GetFileName(tfsRepositoryPath);
return Run(tfsUrl, tfsRepositoryPath, gitRepositoryPath);
}

public int Run(string tfsUrl, string tfsRepositoryPath, string gitRepositoryPath)
Expand Down

0 comments on commit 1ae6b6e

Please sign in to comment.