From 215135607db0831054eaf6382b6d2d3485e7c595 Mon Sep 17 00:00:00 2001 From: qiansc Date: Mon, 9 Nov 2026 02:23:19 +0000 Subject: [PATCH] docs(cli): describe the revision forms resolve accepts Co-Authored-By: Claude Opus 5.5 --- cmd/sourcegraph-cli/main.go | 2 +- docs/interfaces.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/sourcegraph-cli/main.go b/cmd/sourcegraph-cli/main.go index f7cc7c7..a0d0089 100644 --- a/cmd/sourcegraph-cli/main.go +++ b/cmd/sourcegraph-cli/main.go @@ -28,7 +28,7 @@ func run() int { } fs := flag.NewFlagSet("sourcegraph-cli", flag.ContinueOnError) repo := fs.String("repo", "", "canonical repository") - revision := fs.String("revision", "", "full SHA or configured branch") + revision := fs.String("revision", "", "monitored branch or full SHA; resolve also accepts any branch or tag, refs/heads/ or refs/tags/") pattern := fs.String("e", "", "search pattern, like rg -e; otherwise the first argument") fixed := fs.Bool("F", false, "search: match the pattern as literal text, like rg -F") ignoreCase := fs.Bool("i", false, "search: ignore case, like rg -i") diff --git a/docs/interfaces.md b/docs/interfaces.md index 459a616..5fa5658 100644 --- a/docs/interfaces.md +++ b/docs/interfaces.md @@ -117,7 +117,7 @@ sourcegraph-cli read -repo context4ai/context -path README.md -start-line 1 -end | Flag | Purpose | | --- | --- | -| `-repo`, `-revision` | Repository and full SHA or configured branch | +| `-repo`, `-revision` | Repository, and a monitored branch or full SHA; `resolve` also accepts any branch or tag name and `refs/heads/` or `refs/tags/` | | `-e`, `-F`, `-i`, `-l`, `-g` | Search pattern, literal text, ignore case, paths only, include or `!exclude` glob (repeatable) | | `-path`, `-start-line`, `-end-line` | Read target and range (default lines 1–100) | | `-first`, `-after` | Page size and cursor for `list` and `diff` |