コード例 #1
0
ファイル: TagsOverride.cs プロジェクト: gep13/SGV-Net
 /// <summary>
 /// Adds a set of tags to a new <see cref="TagsOverride"/> instance.
 /// If the commitSha is "head" (instead of a SHA1) the tags are applied on the current head of the repository.
 /// </summary>
 /// <param name="commitSha">The commit or "head".</param>
 /// <param name="tags">Tags to apply.</param>
 /// <returns>A new instance.</returns>
 public TagsOverride Add( string commitSha, params string[] tags )
 {
     TagsOverride n = new TagsOverride();
     if( _overrides != null ) n._overrides = new Dictionary<string, IReadOnlyList<string>>( _overrides );
     n.MutableAdd( commitSha, tags );
     return n;
 }
コード例 #2
0
        /// <summary>
        /// Adds a set of tags to a new <see cref="TagsOverride"/> instance.
        /// If the commitSha is "head" (instead of a SHA1) the tags are applied on the current head of the repository.
        /// </summary>
        /// <param name="commitSha">The commit or "head".</param>
        /// <param name="tags">Tags to apply.</param>
        /// <returns>A new instance.</returns>
        public TagsOverride Add(string commitSha, params string[] tags)
        {
            TagsOverride n = new TagsOverride();

            if (_overrides != null)
            {
                n._overrides = new Dictionary <string, IReadOnlyList <string> >(_overrides);
            }
            n.MutableAdd(commitSha, tags);
            return(n);
        }
コード例 #3
0
 public RepositoryInfo GetRepositoryInfo(string commitSha, TagsOverride tags = null)
 {
     return(RepositoryInfo.LoadFromPath(Path, new RepositoryInfoOptions {
         StartingCommitSha = commitSha, OverriddenTags = tags != null ? tags.Overrides : null
     }));
 }
コード例 #4
0
ファイル: RepositoryTester.cs プロジェクト: gep13/SGV-Net
 public RepositoryInfo GetRepositoryInfo( string commitSha, TagsOverride tags = null )
 {
     return RepositoryInfo.LoadFromPath( Path, new RepositoryInfoOptions { StartingCommitSha = commitSha, OverriddenTags = tags != null ? tags.Overrides : null } );
 }