本文整理汇总了C#中UntrackedFilesMode类的典型用法代码示例。如果您正苦于以下问题:C# UntrackedFilesMode类的具体用法?C# UntrackedFilesMode怎么用?C# UntrackedFilesMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UntrackedFilesMode类属于命名空间,在下文中一共展示了UntrackedFilesMode类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetAllChangedFiles
public IList<GitItemStatus> GetAllChangedFiles(bool excludeIgnoredFiles = true, UntrackedFilesMode untrackedFiles = UntrackedFilesMode.Default)
{
var status = RunGitCmd(GitCommandHelpers.GetAllChangedFilesCmd(excludeIgnoredFiles, untrackedFiles));
return GitCommandHelpers.GetAllChangedFilesFromString(this, status);
}
开发者ID:saland,项目名称:gitextensions,代码行数:6,代码来源:GitModule.cs
示例2: GetAllChangedFilesWithSubmodulesStatus
public IList<GitItemStatus> GetAllChangedFilesWithSubmodulesStatus(bool excludeIgnoredFiles = true, UntrackedFilesMode untrackedFiles = UntrackedFilesMode.Default)
{
var status = GetAllChangedFiles(excludeIgnoredFiles, untrackedFiles);
GetCurrentSubmoduleStatus(status);
return status;
}
开发者ID:saland,项目名称:gitextensions,代码行数:6,代码来源:GitModule.cs
示例3: GitStatus
public IList<GitItemStatus> GitStatus(UntrackedFilesMode untrackedFilesMode, IgnoreSubmodulesMode ignoreSubmodulesMode)
{
if (!GitCommandHelpers.VersionInUse.SupportGitStatusPorcelain)
throw new Exception("The version of git you are using is not supported for this action. Please upgrade to git 1.7.3 or newer.");
string command = GitCommandHelpers.GetAllChangedFilesCmd(true, untrackedFilesMode, ignoreSubmodulesMode);
string status = RunGitCmd(command);
return GitCommandHelpers.GetAllChangedFilesFromString(this, status);
}
开发者ID:saland,项目名称:gitextensions,代码行数:9,代码来源:GitModule.cs
示例4: GitStatus
public IList<GitItemStatus> GitStatus(UntrackedFilesMode untrackedFilesMode, IgnoreSubmodulesMode ignoreSubmodulesMode = 0)
{
string command = GitCommandHelpers.GetAllChangedFilesCmd(true, untrackedFilesMode, ignoreSubmodulesMode);
string status = RunGitCmd(command);
return GitCommandHelpers.GetAllChangedFilesFromString(this, status);
}
开发者ID:pmiossec,项目名称:gitextensions,代码行数:6,代码来源:GitModule.cs
示例5: GetAllChangedFiles
public IList<GitItemStatus> GetAllChangedFiles(bool excludeIgnoredFiles = true, bool excludeAssumeUnchangedFiles = true, UntrackedFilesMode untrackedFiles = UntrackedFilesMode.Default)
{
var status = RunGitCmd(GitCommandHelpers.GetAllChangedFilesCmd(excludeIgnoredFiles, untrackedFiles));
List<GitItemStatus> result = GitCommandHelpers.GetAllChangedFilesFromString(this, status);
if (!excludeAssumeUnchangedFiles)
{
string lsOutput = RunGitCmd("ls-files -v");
result.AddRange(GitCommandHelpers.GetAssumeUnchangedFilesFromString(this, lsOutput));
}
return result;
}
开发者ID:pmiossec,项目名称:gitextensions,代码行数:13,代码来源:GitModule.cs
示例6: GetAllChangedFilesCmd
public static string GetAllChangedFilesCmd(bool excludeIgnoredFiles, UntrackedFilesMode untrackedFiles, IgnoreSubmodulesMode ignoreSubmodules)
{
if (!VersionInUse.SupportGitStatusPorcelain)
throw new Exception("The version of git you are using is not supported for this action. Please upgrade to git 1.7.3 or newer.");
StringBuilder stringBuilder = new StringBuilder("status --porcelain -z");
switch(untrackedFiles)
{
case UntrackedFilesMode.Default:
stringBuilder.Append(" --untracked-files");
break;
case UntrackedFilesMode.No:
stringBuilder.Append(" --untracked-files=no");
break;
case UntrackedFilesMode.Normal:
stringBuilder.Append(" --untracked-files=normal");
break;
case UntrackedFilesMode.All:
stringBuilder.Append(" --untracked-files=all");
break;
}
switch (ignoreSubmodules)
{
case IgnoreSubmodulesMode.Default:
stringBuilder.Append(" --ignore-submodules");
break;
case IgnoreSubmodulesMode.None:
stringBuilder.Append(" --ignore-submodules=none");
break;
case IgnoreSubmodulesMode.Untracked:
stringBuilder.Append(" --ignore-submodules=untracked");
break;
case IgnoreSubmodulesMode.Dirty:
stringBuilder.Append(" --ignore-submodules=dirty");
break;
case IgnoreSubmodulesMode.All:
stringBuilder.Append(" --ignore-submodules=all");
break;
}
if (!excludeIgnoredFiles)
stringBuilder.Append(" --ignored");
return stringBuilder.ToString();
}
开发者ID:dominiqueplante,项目名称:gitextensions,代码行数:45,代码来源:GitCommandHelpers.cs
示例7: GetAllChangedFilesCmd
public static string GetAllChangedFilesCmd(bool excludeIgnoredFiles, UntrackedFilesMode untrackedFiles, IgnoreSubmodulesMode ignoreSubmodules = 0)
{
StringBuilder stringBuilder = new StringBuilder("status --porcelain -z");
switch (untrackedFiles)
{
case UntrackedFilesMode.Default:
stringBuilder.Append(" --untracked-files");
break;
case UntrackedFilesMode.No:
stringBuilder.Append(" --untracked-files=no");
break;
case UntrackedFilesMode.Normal:
stringBuilder.Append(" --untracked-files=normal");
break;
case UntrackedFilesMode.All:
stringBuilder.Append(" --untracked-files=all");
break;
}
switch (ignoreSubmodules)
{
case IgnoreSubmodulesMode.Default:
stringBuilder.Append(" --ignore-submodules");
break;
case IgnoreSubmodulesMode.None:
stringBuilder.Append(" --ignore-submodules=none");
break;
case IgnoreSubmodulesMode.Untracked:
stringBuilder.Append(" --ignore-submodules=untracked");
break;
case IgnoreSubmodulesMode.Dirty:
stringBuilder.Append(" --ignore-submodules=dirty");
break;
case IgnoreSubmodulesMode.All:
stringBuilder.Append(" --ignore-submodules=all");
break;
}
if (!excludeIgnoredFiles)
stringBuilder.Append(" --ignored");
return stringBuilder.ToString();
}
开发者ID:stwalkerster,项目名称:gitextensions,代码行数:42,代码来源:GitCommandHelpers.cs
注:本文中的UntrackedFilesMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论