зеркало из https://github.com/microsoft/VFSForGit.git
Merge pull request #1119 from github/rename-workdir-backing-path
Rename WorkingDirectoryBackingRootPath constants This PR primarily is a followup to #1102 to accommodate the fact that on Linux, the relative location of the working directory backing store will be a short path (i.e., ".gvfs/lower") and not a single filename like "src". Hence we rename the WorkingDirectoryBackingRootName constants to WorkingDirectoryBackingRootPath, akin to how other short relative path constants are constructed in GVFS.Common.GVFSConstants.DotGVFS. We also fix up the internal name of the workingDirectoryBackingRoot argument to the GVFS.Common.Enlistment class, and add a TODO comment regarding the git.cmd script, which is unused on non-Windows platforms.
This commit is contained in:
Коммит
22582651bf
|
@ -10,7 +10,7 @@ namespace GVFS.Common
|
|||
protected Enlistment(
|
||||
string enlistmentRoot,
|
||||
string workingDirectoryRoot,
|
||||
string localStorageRoot,
|
||||
string workingDirectoryBackingRoot,
|
||||
string repoUrl,
|
||||
string gitBinPath,
|
||||
string gvfsHooksRoot,
|
||||
|
@ -24,7 +24,7 @@ namespace GVFS.Common
|
|||
|
||||
this.EnlistmentRoot = enlistmentRoot;
|
||||
this.WorkingDirectoryRoot = workingDirectoryRoot;
|
||||
this.WorkingDirectoryBackingRoot = localStorageRoot;
|
||||
this.WorkingDirectoryBackingRoot = workingDirectoryBackingRoot;
|
||||
this.DotGitRoot = Path.Combine(this.WorkingDirectoryBackingRoot, GVFSConstants.DotGit.Root);
|
||||
this.GitBinPath = gitBinPath;
|
||||
this.GVFSHooksRoot = gvfsHooksRoot;
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace GVFS.Common
|
|||
: base(
|
||||
enlistmentRoot,
|
||||
Path.Combine(enlistmentRoot, GVFSConstants.WorkingDirectoryRootName),
|
||||
Path.Combine(enlistmentRoot, GVFSPlatform.Instance.Constants.WorkingDirectoryBackingRootName),
|
||||
Path.Combine(enlistmentRoot, GVFSPlatform.Instance.Constants.WorkingDirectoryBackingRootPath),
|
||||
repoUrl,
|
||||
gitBinPath,
|
||||
gvfsHooksRoot,
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace GVFS.Common
|
|||
public static readonly char PathSeparator = Path.DirectorySeparatorChar;
|
||||
public abstract string ExecutableExtension { get; }
|
||||
public abstract string InstallerExtension { get; }
|
||||
public abstract string WorkingDirectoryBackingRootName { get; }
|
||||
public abstract string WorkingDirectoryBackingRootPath { get; }
|
||||
|
||||
public abstract string GVFSBinDirectoryPath { get; }
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace GVFS.Platform.Mac
|
|||
get { return ".dmg"; }
|
||||
}
|
||||
|
||||
public override string WorkingDirectoryBackingRootName
|
||||
public override string WorkingDirectoryBackingRootPath
|
||||
{
|
||||
get { return GVFSConstants.WorkingDirectoryRootName; }
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ namespace GVFS.Platform.Windows
|
|||
get { return ".exe"; }
|
||||
}
|
||||
|
||||
public override string WorkingDirectoryBackingRootName
|
||||
public override string WorkingDirectoryBackingRootPath
|
||||
{
|
||||
get { return GVFSConstants.WorkingDirectoryRootName; }
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ namespace GVFS.UnitTests.Mock.Common
|
|||
get { return ".mockexe"; }
|
||||
}
|
||||
|
||||
public override string WorkingDirectoryBackingRootName
|
||||
public override string WorkingDirectoryBackingRootPath
|
||||
{
|
||||
get { return GVFSConstants.WorkingDirectoryRootName; }
|
||||
}
|
||||
|
|
|
@ -662,6 +662,7 @@ namespace GVFS.CommandLine
|
|||
return new Result(true);
|
||||
}
|
||||
|
||||
// TODO(Linux), TODO(Mac): either adjust to "git" or remove entirely
|
||||
private void CreateGitScript(GVFSEnlistment enlistment)
|
||||
{
|
||||
FileInfo gitCmd = new FileInfo(Path.Combine(enlistment.EnlistmentRoot, "git.cmd"));
|
||||
|
@ -730,4 +731,4 @@ git %*
|
|||
public string ErrorMessage { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче