Export git_commit_count_since() and git_log_since() - #38
Merged
Merged
Conversation
The count and log primitives behind heartbeat(), promoted to API so downstream tooling (cerebro briefing sources) can compose custom activity reports without carrying their own git plumbing. git_log_since() gains since_date = NULL (no lower bound) and a format argument: "oneline" (default, unchanged) or "iso" (tab-separated ISO-local timestamp, short hash, subject). heartbeat() behavior is unchanged.
system2() tags failed-command output with a status attribute; strip it so non-repos and empty repos yield an attribute-free empty log.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes the git count/log primitives behind
heartbeat()to exported API, so downstream tooling (cerebro's briefing sources) can compose custom activity reports without carrying their own git plumbing.git_commit_count_since(repo_dir, since_date): commit count on HEAD since a date; 0 for non-repos (rev-parse guarded, worktree/dubious-ownership safe).git_log_since(repo_dir, since_date = NULL, n = 5, format = c("oneline", "iso")): recent commit lines; NULL since = unbounded; "iso" gives tab-separated ISO-local timestamp, hash, subject. Failed git yields a barecharacter(0)(no status attribute).heartbeat()behavior unchanged. Version bumped to 0.7.2.2.