sloc-git
Git CLI wrappers, HMAC webhook verification, and scan-schedule store for oxide-sloc.
Overview
This crate provides all Git integration used by the oxide-sloc workspace:
clone_or_fetch(url, dir)— clone a remote repository or fetch the latest changes into an existing local clonecreate_worktree/destroy_worktree— create and clean up Git worktrees for isolated branch scansget_sha(dir, ref)— resolve a branch or tag name to its commit SHAlist_refs(dir)— list all branches and tags with their SHAs and dates, returned asRepoRefslist_commits(dir, ref, limit)— fetch recent commits asVec<GitCommit>normalize_git_url(url)— normalise SSH and HTTPS Git URLs to a canonical form
Webhook parsing
parse_github_push/parse_gitlab_push/parse_bitbucket_push— parse provider-specific webhook payloads into a unifiedWebhookEvent- HMAC-SHA256 signature verification via
ringandsubtlefor constant-time comparison
Scan scheduling
ScheduleStore— JSON-backed store for persistingScanScheduleentriesScanSchedule— cron-style schedule with kind (Once,Hourly,Daily,Weekly,Custom) and next-run tracking
Usage
This is an internal crate used by the oxide-sloc workspace. It is not intended for use outside this project. See the main project for documentation and releases.
# Install the tool instead: