/// <summary>Create a collection of path filters from Java strings.</summary> /// <remarks> /// Create a collection of path filters from Java strings. /// <p> /// Path strings are relative to the root of the repository. If the user's /// input should be assumed relative to a subdirectory of the repository the /// caller must prepend the subdirectory's path prior to creating the filter. /// <p> /// Path strings use '/' to delimit directories on all platforms. /// <p> /// Paths may appear in any order within the collection. Sorting may be done /// internally when the group is constructed if doing so will improve path /// matching performance. /// </remarks> /// <param name="paths">the paths to test against. Must have at least one entry.</param> /// <returns>a new filter for the list of paths supplied.</returns> public static TreeFilter CreateFromStrings(ICollection<string> paths) { if (paths.IsEmpty()) { throw new ArgumentException(JGitText.Get().atLeastOnePathIsRequired); } PathFilter[] p = new PathFilter[paths.Count]; int i = 0; foreach (string s in paths) { p[i++] = PathFilter.Create(s); } return Create(p); }
/// <summary>Create a collection of path filters from Java strings.</summary> /// <remarks> /// Create a collection of path filters from Java strings. /// <p> /// Path strings are relative to the root of the repository. If the user's /// input should be assumed relative to a subdirectory of the repository the /// caller must prepend the subdirectory's path prior to creating the filter. /// <p> /// Path strings use '/' to delimit directories on all platforms. /// <p> /// Paths may appear in any order. Sorting may be done internally when the /// group is constructed if doing so will improve path matching performance. /// </remarks> /// <param name="paths">the paths to test against. Must have at least one entry.</param> /// <returns>a new filter for the paths supplied.</returns> public static TreeFilter CreateFromStrings(params string[] paths) { if (paths.Length == 0) { throw new ArgumentException(JGitText.Get().atLeastOnePathIsRequired); } int length = paths.Length; PathFilter[] p = new PathFilter[length]; for (int i = 0; i < length; i++) { p[i] = PathFilter.Create(paths[i]); } return Create(p); }
internal Single(PathFilter p) { path = p; raw = path.pathRaw; }
internal FollowFilter(PathFilter path) { this.path = path; }
internal BlobCandidate(string name, PathFilter path) : base(null, path) { description = name; }
internal override Candidate Create(RevCommit commit, PathFilter path) { return new Candidate.ReverseCandidate((ReverseWalk.ReverseCommit)commit, path); }
internal ReverseCandidate(ReverseWalk.ReverseCommit commit, PathFilter path) : base (commit, path) { }
internal virtual NGit.Blame.Candidate Create(RevCommit commit, PathFilter path) { return new NGit.Blame.Candidate(commit, path); }
internal Candidate(RevCommit commit, PathFilter path) { sourceCommit = commit; sourcePath = path; }