git-span 1.1.1 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/man/git-span.1 +21 -12
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
The primary CLI surface lives in `src/cli/mod.rs`. Run `git span --help` or `git span drift --help` for flag reference.
|
|
6
6
|
|
|
7
|
+
### Exact batched context
|
|
8
|
+
|
|
9
|
+
`git span context <address>... --format json` returns one schema-v1 snapshot
|
|
10
|
+
for exact repository-relative paths and inclusive line ranges: normalized
|
|
11
|
+
scopes, exact anchored/current overlaps, complete selected spans, why text,
|
|
12
|
+
live status/source facts, and structured mutation counts. `--fix` adds
|
|
13
|
+
cycle-safe positional repair; `--operation-id <uuid>` makes a delivery-unknown
|
|
14
|
+
repair replayable across processes. Failures leave stdout empty, while a valid
|
|
15
|
+
no-overlap query succeeds with an empty `spans` array. The complete schema,
|
|
16
|
+
token, failure, service, and recovery contract is in the
|
|
17
|
+
[command reference](../../plugins-claude/git-span/skills/git-span/references/command-reference.md#exact-batched-context).
|
|
18
|
+
|
|
19
|
+
Linux uses an authenticated private per-worktree watcher service for warm
|
|
20
|
+
queries and falls back to the same strict in-process answer whenever the
|
|
21
|
+
watcher or service is unavailable. The released-binary
|
|
22
|
+
[acceptance harness](./scripts/context-acceptance.py) runs 31 samples in each
|
|
23
|
+
required warm cell. On the documented 2026-08-14 container run, warm context
|
|
24
|
+
p50/p95 improvement over the legacy process lifecycle was at least
|
|
25
|
+
78.2%/76.3% (clean) and reached 86.7%/90.0% (multi-span); cold bootstrap was 43.0 ms,
|
|
26
|
+
invalidated rebuild 42.7 ms, strict fallback 34.6 ms, and a journaled repair
|
|
27
|
+
136.1 ms. Root-switch and linked-worktree checks passed.
|
|
28
|
+
|
|
7
29
|
### The drift cache
|
|
8
30
|
|
|
9
31
|
`git span drift` (and related resolution paths) are backed by a single persistent cache: a SQLite database at `<common_dir>/span/store.db` (plus its `-wal` and `-shm` companions), implemented in `src/resolver/store/`. This is the whole on-disk cache footprint — remove `store.db*` to reset it. Setting `GIT_SPAN_CACHE=0` disables it for a run.
|
package/man/git-span.1
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
.\" GENERATED by gen-manpage. Do not edit by hand.
|
|
1
2
|
.ie \n(.g .ds Aq \(aq
|
|
2
3
|
.el .ds Aq '
|
|
3
|
-
.TH git-span 1 "git-span 1.1.
|
|
4
|
+
.TH git-span 1 "git-span 1.1.7"
|
|
4
5
|
.ie \n(.g .ds Aq \(aq
|
|
5
6
|
.el .ds Aq '
|
|
6
7
|
.SH NAME
|
|
@@ -72,7 +73,9 @@ Bare invocations:
|
|
|
72
73
|
.RS 4
|
|
73
74
|
.TP
|
|
74
75
|
.B git span
|
|
75
|
-
|
|
76
|
+
Print the command help and exit 0. Run
|
|
77
|
+
.B git span list
|
|
78
|
+
with no arguments to list every span.
|
|
76
79
|
.TP
|
|
77
80
|
.BI git\ span\ <name>
|
|
78
81
|
Show one span (anchors, why, config).
|
|
@@ -96,47 +99,53 @@ Print version
|
|
|
96
99
|
.SH SUBCOMMANDS
|
|
97
100
|
.TP
|
|
98
101
|
git\-span\-show(1)
|
|
99
|
-
Show the named span — its anchors, why, and config.
|
|
102
|
+
Show the named span — its anchors, why, and config. The bare `git span <name>` positional form is equivalent to `git span show <name>`
|
|
100
103
|
.TP
|
|
101
104
|
git\-span\-list(1)
|
|
102
105
|
List files and anchors currently tracked by a span
|
|
103
106
|
.TP
|
|
104
107
|
git\-span\-drift(1)
|
|
105
|
-
Report anchors whose content has drifted from their anchored state
|
|
108
|
+
Report anchors whose content has drifted from their anchored state. `paths` may be file paths, globs, or span names; omit them to scan all spans
|
|
109
|
+
.TP
|
|
110
|
+
git\-span\-context(1)
|
|
111
|
+
Return exact dependency context for repository\-relative paths or inclusive line ranges as one versioned JSON document
|
|
106
112
|
.TP
|
|
107
113
|
git\-span\-add(1)
|
|
108
|
-
Add anchors to a span, writing the span file under the span root
|
|
114
|
+
Add anchors to a span, writing the span file under the span root
|
|
109
115
|
.TP
|
|
110
116
|
git\-span\-remove(1)
|
|
111
|
-
Remove anchors from a span, editing the span file under the span root. Stage and commit the change with `git add .span && git commit`
|
|
117
|
+
Remove anchors from a span, editing the span file under the span root. Each anchor must match an existing one on the span exactly. Stage and commit the change with `git add .span && git commit`
|
|
112
118
|
.TP
|
|
113
119
|
git\-span\-replace(1)
|
|
114
|
-
Replace one anchor on a span with another address, in a single atomic transaction: either the old identity is retired and the new identity installed together, or nothing changes
|
|
120
|
+
Replace one anchor on a span with another address, in a single atomic transaction: either the old identity is retired and the new identity installed together, or nothing changes — there is never an intermediate state with both or neither. The new anchor passes the same validation as `add` (path safety, existence, gitignored/rewritten\-target rejection, line\-count extent), so a poisoned declaration is never written
|
|
115
121
|
.TP
|
|
116
122
|
git\-span\-why(1)
|
|
117
123
|
Read or stage the span\*(Aqs why — one or two complete present\-tense clauses carrying decision\-relevant nonlocal context
|
|
118
124
|
.TP
|
|
119
125
|
git\-span\-delete(1)
|
|
120
|
-
Delete a span
|
|
126
|
+
Delete a span — removes its file under the span root. Destructive. Run `git span list` afterward to confirm it is gone, then commit the change
|
|
121
127
|
.TP
|
|
122
128
|
git\-span\-doctor(1)
|
|
123
|
-
Audit the local span setup
|
|
129
|
+
Audit the local span setup — reports span count and findings, plus a store\-size summary (bytes used). Exits 0
|
|
124
130
|
.TP
|
|
125
131
|
git\-span\-tree(1)
|
|
126
132
|
Trace blast radius: render a clique\-grouped impact tree rooted at the files matched by the given paths/globs
|
|
127
133
|
.TP
|
|
128
134
|
git\-span\-merge\-driver(1)
|
|
129
|
-
Resolve `.span/` merge conflicts structurally when invoked by git as a merge driver. Receives three clean blob temp files and the marker length from git. Resolves only what is structurally derivable without trusting the worktree
|
|
135
|
+
Resolve `.span/` merge conflicts structurally when invoked by git as a merge driver. Receives three clean blob temp files and the marker length from git. Resolves only what is structurally derivable without trusting the worktree, which may be mid\-merge. Same\-anchor range/hash divergence is deferred: minimal conflict markers are written and the command exits non\-zero so `git span drift \-\-fix` can finish authoritatively. Exits 0 when fully resolved, 1 when partial (residue markers written)
|
|
130
136
|
.TP
|
|
131
137
|
git\-span\-history(1)
|
|
132
|
-
Show a span\*(Aqs git history as a git\-log\-style timeline: newest\-first commit entries whose patches are real unified diffs of the span declaration and of each anchor\*(Aqs content at its declared address, with the span\*(Aqs live drift rendered before the first commit as a headerless diff. That drift is not working\-tree\-only: it covers every resolver layer `git span drift` reports, and each block names its observational layers on a `drift source` line. `HEAD` identifies the comparison layer; it does not by itself prove that the declaration or content change was committed. Source order is the resolver\*(Aqs: line ranges use Worktree → Index → Head, while whole\-file anchors use Index → Worktree → Head
|
|
138
|
+
Show a span\*(Aqs git history as a git\-log\-style timeline: newest\-first commit entries whose patches are real unified diffs of the span declaration and of each anchor\*(Aqs content at its declared address, rename\-aware by content similarity — a re\-anchor whose old and new content pair at ≥ 50% similarity (git\*(Aqs `\-M` default) renders as a rename, a sub\-threshold re\-anchor renders as a deleted anchor plus a new anchor, and a re\-anchor whose recorded side cannot be read (binary or unrecoverable content) renders `rename from`/`rename to` lines with no similarity claim, the move asserted by the declaration itself. The span\*(Aqs live drift is rendered before the first commit as a headerless diff. That drift is not working\-tree\-only: it covers every resolver layer `git span drift` reports, and each block names its observational layers on a `drift source` line. `HEAD` identifies the comparison layer; it does not by itself prove that the declaration or content change was committed. Source order is the resolver\*(Aqs: line ranges use Worktree → Index → Head, while whole\-file anchors use Index → Worktree → Head
|
|
139
|
+
.TP
|
|
140
|
+
git\-span\-resolve(1)
|
|
141
|
+
Settle every residue entry in a conflict\-markered span file under one explicitly chosen side, and write a clean span
|
|
133
142
|
.TP
|
|
134
143
|
git\-span\-help(1)
|
|
135
144
|
Print this message or the help of the given subcommand(s)
|
|
136
145
|
.ie \n(.g .ds Aq \(aq
|
|
137
146
|
.el .ds Aq '
|
|
138
147
|
.SH VERSION
|
|
139
|
-
v1.1.
|
|
148
|
+
v1.1.7
|
|
140
149
|
.SH EXAMPLES
|
|
141
150
|
Anchor a new span alongside a code change:
|
|
142
151
|
.PP
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-span",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"bin": "bin/git-span.exe",
|
|
5
5
|
"man": [
|
|
6
6
|
"man/git-span.1"
|
|
@@ -8,13 +8,16 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"postinstall": "node scripts/postinstall.js",
|
|
10
10
|
"build:man": "bash scripts/with-target-lock.sh shared env CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/build\" cargo run --quiet --locked --bin gen-manpage -- man/git-span.1",
|
|
11
|
+
"build:schemas": "bash scripts/with-target-lock.sh shared env CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/build\" cargo run --quiet --locked --bin gen-schemas -- ../website",
|
|
12
|
+
"check:schemas": "bash scripts/with-target-lock.sh shared env CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/build\" cargo run --quiet --locked --bin gen-schemas -- --check ../website",
|
|
11
13
|
"build": "yarn build:man",
|
|
12
14
|
"build:local": "bash scripts/build-local.sh",
|
|
13
15
|
"build:clean": "bash scripts/cleanup-stale-target.sh && bash scripts/clean-shared-build.sh && yarn build",
|
|
14
|
-
"test": "bash scripts/with-target-lock.sh
|
|
16
|
+
"test": "bash scripts/with-target-lock.sh exclusive env CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/build\" bash -c 'cargo run --quiet --locked --bin gen-schemas -- --check ../website && cargo nextest run --locked'",
|
|
15
17
|
"lint": "bash scripts/with-target-lock.sh shared env RUSTFLAGS=\"-W unused -W dead-code\" CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/check\" cargo clippy --quiet --locked -- -D warnings",
|
|
16
18
|
"typecheck": "bash scripts/with-target-lock.sh shared env RUSTFLAGS=\"-W unused -W dead-code\" CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/check\" cargo clippy --quiet --locked -- -D warnings",
|
|
17
19
|
"bench:check": "bash scripts/with-target-lock.sh shared env CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/build\" cargo bench --no-run --locked --features bench-corpus",
|
|
20
|
+
"bench:context": "python3 scripts/context-acceptance.py --binary \"${GIT_SPAN_CONTEXT_BINARY:-target-cache/release/git-span}\"",
|
|
18
21
|
"bench": "bash scripts/with-target-lock.sh shared env CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/build\" cargo bench --locked",
|
|
19
22
|
"udeps": "bash scripts/with-target-lock.sh shared env CARGO_TARGET_DIR=\"${GIT_SPAN_CARGO_TARGET_ROOT:-/var/cache/git-span/cargo-target}/git-span/udeps\" cargo +nightly udeps"
|
|
20
23
|
},
|
|
@@ -24,11 +27,11 @@
|
|
|
24
27
|
"scripts/postinstall.js"
|
|
25
28
|
],
|
|
26
29
|
"optionalDependencies": {
|
|
27
|
-
"git-span-darwin-arm64": "1.1.
|
|
28
|
-
"git-span-darwin-x64": "1.1.
|
|
29
|
-
"git-span-linux-arm64": "1.1.
|
|
30
|
-
"git-span-linux-x64": "1.1.
|
|
31
|
-
"git-span-win32-x64": "1.1.
|
|
30
|
+
"git-span-darwin-arm64": "1.1.7",
|
|
31
|
+
"git-span-darwin-x64": "1.1.7",
|
|
32
|
+
"git-span-linux-arm64": "1.1.7",
|
|
33
|
+
"git-span-linux-x64": "1.1.7",
|
|
34
|
+
"git-span-win32-x64": "1.1.7"
|
|
32
35
|
},
|
|
33
36
|
"repository": {
|
|
34
37
|
"type": "git",
|