(root: &Path, pattern: &str)
| 2617 | } |
| 2618 | |
| 2619 | fn git_ref_count(root: &Path, pattern: &str) -> usize { |
| 2620 | let git = GitRepository::open(root).unwrap(); |
| 2621 | git.references_glob(pattern) |
| 2622 | .map(|refs| refs.flatten().count()) |
| 2623 | .unwrap_or(0) |
| 2624 | } |
| 2625 | } |