本文整理汇总了C#中IgnoreSubmodulesMode类的典型用法代码示例。如果您正苦于以下问题:C# IgnoreSubmodulesMode类的具体用法?C# IgnoreSubmodulesMode怎么用?C# IgnoreSubmodulesMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IgnoreSubmodulesMode类属于命名空间,在下文中一共展示了IgnoreSubmodulesMode类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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();
}
示例3: 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);
}
示例4: 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();
}