Skip to content

Releases: SamuelSupe/git-rg

git-rg v0.7.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 11:27

git-rg v0.7.0

Create GitHub and GitLab issues with Agent identity. Remote writes remain off by default.

English

Issue creation

git-rg issue create accepts a required title and optional Markdown body through --body, --body-file FILE, or --body-file - for stdin. It supports GitHub, GitLab, and self-managed instances without cloning or resolving a commit. Optional --agent-name, --agent-model, and --agent-run-id parameters append self-reported attribution; the platform author remains the authenticated account.

# Preview locally without credentials or remote requests.
git-rg issue create --dry-run --title "Unexpected result" --body-file issue.md github:OWNER/REPO

# Requires GITRG_WRITE_TOKEN with issue-creation permission.
git-rg issue create --enable-write --title "Unexpected result" --body-file issue.md \
  --agent-name "Review Agent" --agent-run-id run-123 github:OWNER/REPO

Use gitlab:GROUP/PROJECT for GitLab. Both git-rg issue --help and git-rg issue create --help include examples and explain permissions, attribution, and retry behavior. Successful creation returns NDJSON with the issue number, URL, state, and result.complete=true; preview returns a separate preview event. Titles are limited to 200 UTF-8 bytes; bodies, including attribution, to 64 KiB.

Permissions and recovery

Creation requires both --enable-write and GITRG_WRITE_TOKEN. GitHub fine-grained tokens need Issues: write; code/PR write permissions alone are insufficient. GitLab tokens need API access and a role allowed to create project issues. Read credentials and CLI logins are never substituted for creation credentials. --dry-run takes precedence over --enable-write and does not check remote existence or permissions.

Issue creation is neither retried automatically nor deduplicated. A lost or ambiguous response returns issue_creation_uncertain; inspect the repository's issue list before retrying. A run ID is attribution, not an idempotency key. This version creates ordinary issues; labels, assignees, comments, updates, and closing are outside its scope.

Existing search, read, proposal, single-token fallback, exit codes, and NDJSON schema v1 remain compatible. Upgrading does not enable remote writes.

Validation and installation

OrbStack Linux arm64 validation passed full race tests, vet, and build. HTTP fixtures cover GitHub/GitLab requests, nested and self-managed project paths, write gating, body input, Agent attribution, credential separation, timeouts, API rejections, and uncertain responses without replay. CI runs tests and help checks on all six native platforms. The release workflow checks installed issue previews on those platforms and retains live read-only GitHub/GitLab smoke checks. Live issue and commit/PR/MR creation are not part of release smoke tests.

The release provides six archives (Linux/macOS/Windows, amd64/arm64), both installers, and checksums.txt. See Installation, Issue creation, and Agent changes.

中文

创建 issue

新增 git-rg issue create,支持 GitHub、GitLab 及自建实例,无需 clone 或解析 commit。标题必填,Markdown 正文可通过 --body、--body-file FILE 或 --body-file -(stdin)传入。可选的 --agent-name、--agent-model、--agent-run-id 会附加 Agent 自报身份,平台作者仍是凭证对应的账号。

# 本地预览,不需要凭证,也不请求远端。
git-rg issue create --dry-run --title "描述发现的问题" --body-file issue.md github:OWNER/REPO

# 需要具备 issue 创建权限的 GITRG_WRITE_TOKEN。
git-rg issue create --enable-write --title "描述发现的问题" --body-file issue.md \
  --agent-name "Review Agent" --agent-run-id run-123 github:OWNER/REPO

GitLab 使用 gitlab:GROUP/PROJECT。git-rg issue --help 和 git-rg issue create --help 均提供示例及权限、身份、重试说明。创建成功返回 NDJSON,包含 issue 编号、URL、状态和 result.complete=true;预览返回独立的 preview 事件。标题最多 200 字节,含身份信息的正文最多 64 KiB,均要求 UTF-8。

权限与恢复

写入默认关闭。创建需要同时提供 --enable-write 和 GITRG_WRITE_TOKEN。GitHub fine-grained token 需要 Issues: write,仅有代码或 PR 写权限不够;GitLab token 需要 API 访问权限及允许创建项目 issue 的角色。读取凭证和 CLI 登录不会替代创建凭证。--dry-run 优先于 --enable-write,不检查远端仓库是否存在及当前权限。

创建请求不自动重试、不去重。响应丢失或结果不确定时返回 issue_creation_uncertain,重新执行前应检查远端 issue 列表。运行 ID 只用于身份归属,不是幂等键。本版仅创建普通 issue,不管理标签、负责人、评论、更新或关闭。

既有搜索、读取、提案、单 token 回退、退出码及 NDJSON schema v1 保持兼容。升级不会启用远端写入。

验证与安装

OrbStack Linux arm64 中通过全量 race 测试、vet 和构建。HTTP 模拟测试覆盖 GitHub/GitLab 请求、嵌套路径与自建实例、写入开关、正文输入、Agent 身份、凭证隔离、超时、API 拒绝,以及不确定响应不重放。CI 在六个平台原生运行测试和帮助检查;发布流程验证安装后的 issue 预览,并保留真实 GitHub/GitLab 只读 smoke。发布 smoke 不创建真实 issue 或 commit/PR/MR。

发布包含 Linux/macOS/Windows 的 amd64/arm64 六个 archive、两个安装器和 checksums.txt。详见安装文档、issue 创建说明和Agent 变更文档。

完整变更记录 / Full changelog: v0.6.0...v0.7.0

git-rg v0.6.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 10:56

git-rg v0.6.0

One token for reading and proposing changes. Remote writes remain off by default.

English

Single-token authentication

Search, refs, read, and propose --dry-run now fall back to GITRG_WRITE_TOKEN when no applicable read environment token is set. Agents can read a file, preview changes, and publish a draft PR/MR without configuring two tokens. This works with --auth auto, --auth env, GitHub, GitLab, and self-managed hosts.

Read credentials keep their priority:

  • GitHub.com: GITRG_TOKEN → GITHUB_TOKEN → GH_TOKEN → GITRG_WRITE_TOKEN.
  • GitLab.com: GITRG_TOKEN → GITLAB_TOKEN → GITRG_WRITE_TOKEN.
  • Self-managed hosts: GITRG_TOKEN → GITRG_WRITE_TOKEN.

With no applicable environment token, auto can reuse the matching gh/glab login; env continues anonymously. A rejected credential does not trigger a retry with another identity.

Upgrade behavior

This minor release changes credential selection when GITRG_WRITE_TOKEN is set without a read environment token: reads use that token before a CLI login. Set GITRG_TOKEN explicitly if you want a separate read identity. The token must have access to read the repository and its metadata; setting it does not grant additional platform permissions.

Publication still requires propose --enable-write and GITRG_WRITE_TOKEN. Read credentials are never substituted for publication credentials. Dry runs make only read requests, even alongside --enable-write. Exit codes, NDJSON schema v1, Agent identity parameters, and proposal conflict/recovery behavior are unchanged.

Validation and installation

OrbStack Linux arm64 validation passed full race tests, vet, and build. HTTP regression fixtures cover single-token GitHub/GitLab read/preview/publication flows, credential precedence, rejected credentials, and default-disabled writes. The release workflow validates all six native platform builds and installers, uses only GITRG_WRITE_TOKEN for live GitHub search/refs/read/preview checks, and retains anonymous public GitLab smoke checks. Live commit/PR/MR writes are not part of this release's smoke tests.

The release provides six archives (Linux/macOS/Windows, amd64/arm64), both installers, and checksums.txt. See Installation and Agent changes.

中文

单 token 认证

搜索、refs、read 和 propose --dry-run 在没有适用的读取环境变量时,会回退使用 GITRG_WRITE_TOKEN。Agent 只配置一个 token,即可读取文件、预览变更并发布草稿 PR/MR。此行为支持 --auth auto、--auth env、GitHub、GitLab 及自建实例。

已有读取凭证仍优先:

  • GitHub.com:GITRG_TOKEN → GITHUB_TOKEN → GH_TOKEN → GITRG_WRITE_TOKEN。
  • GitLab.com:GITRG_TOKEN → GITLAB_TOKEN → GITRG_WRITE_TOKEN。
  • 自建实例:GITRG_TOKEN → GITRG_WRITE_TOKEN。

没有适用的环境变量 token 时,auto 可复用对应 gh/glab 登录,env 则匿名继续。凭证被 API 拒绝后不会切换身份重试。

升级行为

本次 minor release 扩展了凭证选择规则:当配置 GITRG_WRITE_TOKEN 而未配置读取环境变量时,读取会先使用该 token,再考虑 CLI 登录。需要保留独立读取身份时,请显式配置 GITRG_TOKEN。token 本身必须具备读取目标仓库及元数据的权限;设置环境变量不会增加平台权限。

写入默认关闭,发布仍需 propose --enable-write 和 GITRG_WRITE_TOKEN,不会用读取凭证替代写入凭证。dry-run 即使同时传入 --enable-write 也只发出读取请求。退出码、NDJSON schema v1、Agent 身份参数及提案冲突检查/恢复行为保持兼容。

验证与安装

OrbStack Linux arm64 中通过全量 race 测试、vet 和构建。HTTP 模拟回归覆盖 GitHub/GitLab 单 token 读取、预览及发布流程、凭证优先级、认证失败和默认禁止写入。发布流程检查六个平台的原生构建和安装,仅配置 GITRG_WRITE_TOKEN 验证真实 GitHub 搜索、refs、读取和预览,并保留匿名 GitLab 公开仓库 smoke。本次 smoke 不执行真实 commit/PR/MR 写入。

发布包含 Linux/macOS/Windows 的 amd64/arm64 六个 archive、两个安装器和 checksums.txt。详见安装文档和Agent 变更文档。

完整变更记录 / Full changelog: v0.5.0...v0.6.0

git-rg v0.5.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 03:38

git-rg v0.5.0

Agent-authored changes and draft GitHub PRs / GitLab MRs without cloning. Remote writes remain off by default.

English

Read, preview, and propose

  • git-rg read returns the complete UTF-8 file, immutable commit SHA, blob SHA, and file mode, with downloaded bytes verified against the blob ID.
  • git-rg propose --dry-run --changes changes.json validates a plan and emits a unified diff using read-only requests.
  • git-rg propose --enable-write --changes changes.json creates one commit on a new same-repository branch and a draft PR/MR. Each invocation requires a separate GITRG_WRITE_TOKEN; an existing read credential or a token alone cannot enable writes.
  • Optional --agent-name, --agent-model, and --agent-run-id flags, or an agent object in the plan, add self-reported attribution to the description. The authenticated platform author remains the token's account.

Conflict checks and recovery

Publication checks the pinned base, expected file blobs, source branch, commit parent, and complete resulting tree. It never updates an unrelated existing branch. Identical plans and agent identities can recover a matching commit or PR/MR after an uncertain response. Write requests are neither automatically retried nor redirected. result.complete describes publication only, not test or CI success.

The command supports up to 100 regular text-file changes, 1 MiB per file, and 4 MiB each for original and replacement content. Binary/LFS edits, symlinks, submodules, fork PRs, existing-branch updates, automatic merging, and executing repository code are outside this release's scope.

Boundary fixes

  • Apply GitLab deletions before additions, allowing a directory to be replaced with a file while preserving recovery fingerprints.
  • Include stdin and change-plan reading in the overall timeout, even when the producer has not closed the pipe.
  • Quote Unicode filenames using Git-compatible byte escapes, so the emitted preview can be applied by Git.

Upgrade and validation

Existing search/ref commands, automatic read authentication, exit codes, and NDJSON schema v1 remain compatible. Read-only users need no migration. See Agent changes for the plan schema, identity parameters, limits, and recovery examples.

Local validation used OrbStack Linux arm64 with Go 1.26: full race tests, vet, and build. Regression tests cover timeout handling, actual git apply of Unicode diffs, both providers' publication/recovery flows through HTTP fixtures, default-disabled writes, and identity propagation. Live provider smoke checks exercise read-only paths; live commit/PR/MR writes are not certified by those fixtures.

The Release workflow builds and checks six native binaries (Linux/macOS/Windows, amd64/arm64), then verifies installation and public-provider smoke paths. Assets include six archives, two installers, and checksums.txt. See Installation.

中文

读取、预览与创建提案

  • git-rg read 返回完整 UTF-8 文本、固定 commit SHA、blob SHA 和文件模式,并核验下载内容的 blob ID。
  • git-rg propose --dry-run --changes changes.json 只读校验变更计划并输出 unified diff。
  • git-rg propose --enable-write --changes changes.json 在同仓库的新分支创建一个 commit 和草稿 PR/MR。写入默认关闭,每次必须显式启用并提供独立的 GITRG_WRITE_TOKEN,不会复用读取凭证进行写入。
  • 可通过 --agent-name、--agent-model、--agent-run-id 或计划中的 agent 对象,在描述中附加 Agent 自报身份。平台作者仍为 Token 对应账号。

冲突检查与失败恢复

发布会检查固定基线、预期文件 blob、源分支、commit parent 和完整结果 tree,不覆盖无关的已有分支。响应不确定时,相同计划及身份可以恢复匹配的 commit 或 PR/MR。写入请求不自动重试、不跟随重定向;result.complete 只表示提案发布完成,不代表测试或 CI 通过。

最多支持 100 个普通文本文件变更、每文件 1 MiB、原内容与新内容各 4 MiB。本版不支持编辑二进制/LFS、symlink、submodule、fork PR、更新已有分支、自动合并或执行仓库代码。

边界修复

  • GitLab 先执行删除,再执行添加,支持把目录替换为文件,并保留原有恢复指纹。
  • stdin 和变更计划读取纳入整体超时,上游未关闭管道时也能退出。
  • Unicode 文件名使用 Git 兼容的字节转义,预览 diff 可由 Git 正确应用。

升级与验证

已有搜索/ref 命令、自动读取认证、退出码及 NDJSON schema v1 保持兼容,只读用户无需迁移。计划格式、身份参数、限制和恢复示例见变更提案文档。

本地在 OrbStack Linux arm64、Go 1.26 中通过全量 race 测试、vet 和构建。回归覆盖输入超时、Unicode diff 的实际 git apply、两个 provider 的 HTTP 模拟发布/恢复、默认禁止写入和身份传递。真实服务 smoke 验证只读路径;HTTP 模拟测试不等于真实远端 commit/PR/MR 写入验收。

Release workflow 构建并检查 Linux/macOS/Windows 的 amd64/arm64 六个原生二进制,再执行安装与公开仓库 smoke。发布资产为六个 archive、两个安装脚本和 checksums.txt,安装与回滚方式见安装文档。

完整变更记录 / Full changelog: v0.4.1...v0.5.0

git-rg v0.4.1

Choose a tag to compare

@github-actions github-actions released this 08 Sep 13:06

git-rg v0.4.1

v0.4.1 fixes automatic GitLab authentication when a token stored by glab has spaces or tabs around it. Thanks to @coanor for PR #1.

English

GitLab credential fix

A padded token could work with glab auth status and glab api while git-rg rejected it, emitted auth_unavailable, and fell back to anonymous access. Private or internal repositories could then return HTTP 404.

  • Trim leading and trailing ASCII spaces and tabs from the GitLab helper password before validating the access token. This applies to both PAT and OAuth credentials.
  • Continue rejecting embedded whitespace, control bytes, invalid UTF-8, empty credentials, CI job tokens, and conflicting credential fields.
  • Stored credentials, environment-token priority, --auth auto / --auth env, CLI exit codes, and NDJSON schema v1 remain unchanged. No migration is required; upgrade the binary to v0.4.1.

Verification and assets

The PR passed go test -race ./..., go vet ./..., and go build ./... on OrbStack Linux arm64 with Go 1.26.0. Regression coverage exercises credential resolution with padded PAT/OAuth tokens, CRLF helper output, capability fields, and invalid tokens. The contributor also reported a successful macOS arm64 run against an internal GitLab repository with glab 1.115.0 and a real padded PAT; that private-instance check was not independently repeated for this release.

The release provides Linux, macOS, and Windows archives for amd64 and arm64, plus install.sh, install.ps1, and checksums.txt (nine assets). Checksums cover all six archives and both installers. Native build and installation smoke results are available in the Release workflow. See the installation guide for installation and rollback.

中文

GitLab 凭证修复

当 glab 保存的 token 两端带有空格或制表符时,glab auth status 和 glab api 可能正常工作,但 git-rg 会拒绝该凭证、发出 auth_unavailable 并回退为匿名访问,导致私有或 internal 仓库返回 HTTP 404。

  • 校验前移除 GitLab helper password 两端的 ASCII 空格和制表符,同时支持 PAT 和 OAuth access token。
  • 仍拒绝内部空白、控制字符、无效 UTF-8、空凭证、CI job token 和冲突的凭证字段。
  • 已保存的凭证、环境变量 token 优先级、--auth auto / --auth env、CLI 退出码及 NDJSON schema v1 均保持不变。无需迁移,升级二进制到 v0.4.1 即可。

验证与发布资产

已在 OrbStack Linux arm64、Go 1.26.0 上验证此 PR,通过 go test -race ./...、go vet ./... 和 go build ./...。回归测试覆盖带空白的 PAT/OAuth token、CRLF helper 输出、capability 字段和无效 token。贡献者另报告在 macOS arm64、glab 1.115.0 上使用真实带空白 PAT 成功访问 internal GitLab 仓库;本次发布未独立复验该私有实例。

Release 包含 Linux、macOS、Windows 的 amd64/arm64 六个 archive,以及 install.sh、install.ps1 和 checksums.txt,共九个资产。checksum 覆盖六个 archive 和两个安装器。原生构建与安装 smoke 结果见 Release workflow,安装及回滚步骤见安装文档。

完整变更记录 / Full changelog: v0.4.0...v0.4.1

git-rg v0.4.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 11:17

git-rg v0.4.0

v0.4.0 makes existing gh and glab logins usable by default for remote search and ref listing, while keeping environment tokens as the first choice and preserving an anonymous fallback.

English

Automatic credentials

  • Search and refs now default to --auth auto: non-empty existing environment tokens are used first, then the current account from gh or glab is reused for the matching host.
  • Use --auth env to disable CLI credential lookup. No new credential store, login command, dependency, or token CLI flag was added.
  • GitHub uses gh auth token --hostname HOST. GitLab checks glab auth status --hostname HOST, then reads the access credential through glab auth git-credential get. PAT and OAuth access tokens are sent as Authorization: Bearer; CI job tokens and malformed helper output are rejected.
  • Automatic lookup is limited to HTTPS repositories whose API origin matches the repository origin, including the GitHub github.com to api.github.com mapping and same-origin custom API paths. Insecure or cross-origin API overrides skip helper lookup and emit a warning.
  • Helper execution is non-interactive, runs in an isolated temporary directory, keeps the token in memory, and caps combined stdout/stderr at 64 KiB per helper invocation. The helper phase is limited to 10 seconds within the command --timeout.
  • If the CLI is not installed, gitrg silently continues anonymously. An unavailable, timed-out, or invalid installed helper produces one auth_unavailable warning and continues anonymously. An API authentication failure never triggers an anonymous or alternate-identity retry. Requests made by glab for status or OAuth refresh are not counted in gitrg's --max-requests budget.

The hidden glab credential helper must be supported by the installed version and its credential store. OAuth refresh and any resulting credential persistence remain managed by glab; git-rg does not implement either. Upgrade incompatible glab versions or use an environment token with --auth env.

Release assets

The release contains six Tier 1 archives, install.sh, install.ps1, and checksums.txt:

git-rg_v0.4.0_linux_amd64.tar.gz, git-rg_v0.4.0_linux_arm64.tar.gz, git-rg_v0.4.0_darwin_amd64.tar.gz, git-rg_v0.4.0_darwin_arm64.tar.gz, git-rg_v0.4.0_windows_amd64.zip, and git-rg_v0.4.0_windows_arm64.zip.

Each archive contains one top-level version directory and one platform binary. checksums.txt covers all six archives and both installers; verify it before extraction or execution. See installation.md for installation and rollback procedures.

Verification

Local validation passed on OrbStack Linux arm64 with Go 1.26.1: go test -race ./..., go vet ./..., and go build ./.... A host smoke run with the real macOS gh keyring login also completed successfully against a public GitHub repository. Real glab login and GitLab OAuth refresh were not available for local validation. Published build and installation checks are available in the Release workflow.

中文

自动复用凭证

  • 搜索和 refs 现在默认使用 --auth auto:先使用已有的非空环境变量 token,再复用目标站点对应账号的 gh 或 glab 登录。
  • 使用 --auth env 可关闭 CLI 凭证读取。没有新增凭证存储、登录命令、依赖或 token CLI 参数。
  • GitHub 调用 gh auth token --hostname HOST。GitLab 先检查 glab auth status --hostname HOST,再通过 glab auth git-credential get 读取访问凭证。PAT 和 OAuth access token 统一使用 Authorization: Bearer;CI job token 和格式异常的 helper 输出会被拒绝。
  • 自动读取仅适用于仓库与 API 都使用 HTTPS 且 origin 匹配的情况,包括 GitHub github.com 到 api.github.com 的映射,以及同 origin 的自定义 API 路径。非 HTTPS 或跨 origin 的 API 覆盖会跳过 helper 并发出 warning。
  • helper 以非交互方式在独立临时目录运行,token 只保留在内存中,每次 helper 调用的 stdout/stderr 合计上限为 64 KiB。helper 阶段最多 10 秒,并计入命令的 --timeout。
  • 未安装 CLI 时,gitrg 会静默匿名继续。已安装的 helper 不可用、超时或输出无效时只发出一次 auth_unavailable warning,然后匿名继续。API 认证失败不会切换到匿名身份或其他身份重试。glab 的状态检查和 OAuth 刷新请求不计入 gitrg 的 --max-requests 预算。

所安装的 glab 版本及其凭证库必须支持隐藏的 credential helper。OAuth 刷新及其产生的凭证持久化仍由 glab 管理,git-rg 不实现这两项行为。版本不兼容时请升级 glab,或通过 --auth env 使用环境变量 token。

发布资产

Release 包含六个 Tier 1 平台 archive、install.sh、install.ps1 和 checksums.txt:

git-rg_v0.4.0_linux_amd64.tar.gz、git-rg_v0.4.0_linux_arm64.tar.gz、git-rg_v0.4.0_darwin_amd64.tar.gz、git-rg_v0.4.0_darwin_arm64.tar.gz、git-rg_v0.4.0_windows_amd64.zip 和 git-rg_v0.4.0_windows_arm64.zip。

每个 archive 包含一个顶层版本目录和一个平台可执行文件。checksums.txt 覆盖六个 archive 和两个安装器;解压或执行前请先校验。安装和回滚流程见 installation.md。

验证

已在 OrbStack Linux arm64、Go 1.26.1 上通过本地验证:go test -race ./...、go vet ./... 和 go build ./...。使用本机真实 macOS gh keyring 登录对公开 GitHub 仓库执行的 smoke 也成功。由于本机没有 glab,真实 glab 登录和 GitLab OAuth 刷新尚未验证。发布构建与安装验收结果见 Release workflow。

完整变更记录:v0.3.0...v0.4.0

git-rg v0.3.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 08:42

git-rg v0.3.0

v0.3.0 tightens completeness guarantees for remote commit search and reduces the local cost of cached and streamed scans. The CLI and NDJSON schema remain compatible with v0.2.0.

English

Immutable search scope

  • exact and auto resolve a branch, tag, or commit to one immutable commit and load its complete tree before declaring a result complete. An incomplete tree, failed pagination, or failed subtree retrieval cannot produce complete=true.
  • Archive entries are checked against the Git blob object ID (blob <size>\0 plus the entry content). Archive omissions or rewrites caused by export-ignore, export-subst, or Git LFS are supplemented from the blob API, while the immutable tree remains the search scope.
  • auto may use the provider index to accelerate candidate ordering, but it still verifies and scans the selected commit like exact. indexed remains a candidate-only mode and is never evidence of complete repository coverage.

Search and cache path

  • When explicit globs narrow the search, validated cached selected blobs are used first. Download limits apply only to cache misses.
  • Cache probing is bounded: after more than eight misses, the remaining entries return to the usual archive/index strategy. Small eligible missing sets can use the bounded blob path; broad selections use the full archive scan.
  • Windows cache readers and timestamp updates allow concurrent entry replacement while existing readers retain the complete previous contents.
  • Tree JSON is decoded and glob-filtered as a stream. Matching is byte-oriented, reader/probe buffers are pooled, and glob segments are compiled once per query.
  • Result events use a conservative 256 KiB memory budget per spool, then use a private temporary spool capped at 32 MiB. Temporary result files are removed after consumption.
  • NDJSON output uses a 64 KiB writer and a 100 ms flush timer. Metadata, the first match, warnings, errors, and the summary are flushed promptly so a pipe can observe the first result without waiting for the whole scan.

CLI and migration

  • NDJSON remains schema_version: 1. Existing fields, types, exit codes, and the meanings of complete, truncated, and reason are unchanged.
  • The cache now uses v2 .entry objects with an integrity header and SHA-256 protected payload. Older cache files are treated as misses and are not reused; the next query downloads valid objects again automatically. No CLI flag change is required.
  • Complete tree pagination counts toward --max-requests. Large repositories may need a larger request budget for exact or auto.
  • With v0.3.0 current, v0.2.0 and v0.1.0 are EOL under SUPPORT.md; they remain available for reproduction and rollback only.

Release assets

The release contains six Tier 1 archives, install.sh, install.ps1, and checksums.txt:

git-rg_v0.3.0_linux_amd64.tar.gz, git-rg_v0.3.0_linux_arm64.tar.gz, git-rg_v0.3.0_darwin_amd64.tar.gz, git-rg_v0.3.0_darwin_arm64.tar.gz, git-rg_v0.3.0_windows_amd64.zip, and git-rg_v0.3.0_windows_arm64.zip.

Each archive has one top-level version directory and one platform binary. checksums.txt covers all six archives and both installers; verify it before extraction or execution. See installation.md for installation and rollback procedures.

Verification

The source has passed go test -race ./..., go vet ./..., and go build ./cmd/git-rg on OrbStack Linux arm64 with Go 1.26.1. Native CI and the Release workflow passed on all six platforms. Release checks include native version/help smoke tests, installation with the published scripts, real GitHub searches on every platform, and a real GitLab search on Linux amd64.

中文

不可变搜索范围

  • exact 和 auto 会先把 branch、tag 或 commit 解析为一个不可变 commit,并读取完整 tree;tree 分页或 subtree 不完整时不会声明 complete=true。
  • archive 条目按 Git blob OID(blob <size>\0 加正文)校验。export-ignore、export-subst 或 Git LFS 导致的归档缺失、改写,会从 blob API 补齐;搜索范围仍以不可变 tree 为准。
  • auto 可以利用 provider 索引加速候选排序,但最终仍按 exact 方式核验和扫描所选 commit。indexed 只代表索引候选范围,未命中不能证明仓库没有匹配。

搜索与缓存路径

  • 显式 glob 缩小搜索范围时,会先使用已验证的选中 blob 缓存,下载限制只作用于缓存未命中项。
  • 缓存探测有界:未命中超过 8 个后,剩余条目交回原有 archive/索引策略;较小的缺失集合可走受限 blob 路径,大范围选择使用完整 archive 扫描。
  • Windows 缓存读取与时间戳更新允许并发替换条目,已打开的读者仍能读取完整的旧内容。
  • tree JSON 采用流式解码和 glob 筛选;匹配按字节处理,reader/probe buffer 复用,glob segment 在每次查询时预编译。
  • 每个结果 spool 先使用 256 KiB 的保守内存字节预算,超出后写入私有临时文件,文件上限 32 MiB,消费完成后删除。
  • NDJSON 使用 64 KiB 输出缓冲和 100 ms 刷新定时器;meta、首条 match、warning、error 与 summary 会及时刷新。

CLI、迁移与资产

  • NDJSON 继续使用 schema_version: 1;字段、类型、退出码以及 complete、truncated、reason 的完整性含义保持不变。
  • 缓存切换到带完整性校验的 v2 .entry 格式。旧缓存不会复用,会按未命中自动重新拉取;无需修改 CLI 参数。
  • 完整 tree 分页计入 --max-requests;大型仓库使用 exact 或 auto 时可能需要提高预算。v0.2.0 与 v0.1.0 按 SUPPORT.md 进入 EOL,仅保留复现和回滚用途。
  • Release 提供 Linux、macOS、Windows 的 amd64/arm64 六个 archive、install.sh、install.ps1 和覆盖六个 archive 和两个安装器的 checksums.txt。六平台原生 CI 和 Release 验证 已全部通过,包括原生版本/help 检查、发布脚本安装、全部平台的真实 GitHub 搜索,以及 Linux amd64 的真实 GitLab 搜索。

完整变更记录:v0.2.0...v0.3.0

git-rg v0.2.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 04:25

Full Changelog: v0.1.0...v0.2.0

git-rg v0.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 03:00

首个公开版本:通过 GitHub/GitLab API 在指定远端仓库中执行类似 rg 的文本搜索,不 clone、不 checkout,也不下载 Git 历史。

Highlights

  • auto、exact、indexed 三种搜索模式;exact 固定到不可变 commit 后保证完整扫描语义。
  • 默认 NDJSON,提供稳定 meta/match/context/warning/error/summary 事件,适合 agent 和脚本消费。
  • 支持 glob、上下文、固定字符串、忽略大小写、整词匹配、结果上限与安全缓存。
  • 支持 GitHub、GitLab、GitHub Enterprise、自建 GitLab、私有仓库、branch/tag/commit ref。
  • 提供 refs 和 --commit-info,可发现分支、tag 及提交作者信息。
  • 预构建 Linux、macOS、Windows 的 amd64/arm64 版本,并附 checksums.txt。

安装、认证、完整性语义和使用示例请见 README。

Full Changelog: https://github.com/SamuelSupe/git-rg/commits/v0.1.0