当前位置: 首页>>代码示例>>C#>>正文


C# IgnoreSubmodulesMode类代码示例

本文整理汇总了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);
        }
开发者ID:saland,项目名称:gitextensions,代码行数:9,代码来源:GitModule.cs

示例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();
        }
开发者ID:dominiqueplante,项目名称:gitextensions,代码行数:45,代码来源:GitCommandHelpers.cs

示例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);
 }
开发者ID:pmiossec,项目名称:gitextensions,代码行数:6,代码来源:GitModule.cs

示例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();
        }
开发者ID:stwalkerster,项目名称:gitextensions,代码行数:42,代码来源:GitCommandHelpers.cs


注:本文中的IgnoreSubmodulesMode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。