pub fn recent_branches(
cwd: &Path,
since: SystemTime,
include_remote_branches: bool,
only_remote: Option<&str>,
) -> Result<Vec<RecentRef>, Error>Expand description
Refs whose tip commit was authored on or after since. Mirrors
upstream’s git.RecentBranches (git/git.go::RecentBranches).
Output is filtered:
- if
include_remote_branchesis false, refs underrefs/remotes/are dropped entirely. - if
only_remoteisSome(name), remote refs not underrefs/remotes/<name>/are dropped (local refs and tags pass through regardless).
git for-each-ref is asked to sort newest-first; the iteration
stops at the first ref older than since so large repos don’t
pay for refs they’d discard anyway.