Skip to content

v1.3.0

Choose a tag to compare

@thomasbachem thomasbachem released this 23 Sep 06:12
· 198 commits to main since this release

A standing edit.verifySpan used to give a single run two prices: every rebuilt commit, or --no-verify. A one-line fold 108 commits deep ran the suite 108 times – seven minutes, the fold itself instant – and the caller learned that from the output, after the fact.

--no-verify-span steps one run back down to the default tier – the primary commit and the tip – where --no-verify would skip the check altogether. A pause keeps the declined tier for its resume, and the flag is refused together with --verify-span.

A caller picks its flags before running, so the price that can reach it in time is the previous run's. The Verified line now carries what the whole check took, and under a standing edit.verifySpan what the tier ran beyond the default one, with the lever named – the mirror of the default tier's own line, which already names --verify-span for the commits it left unchecked:

Verified 108 commit(s) with `npm test` in 412s – 106 beyond the default tier, `--no-verify-span` runs only its 2 (set by edit.verifySpan)

A run that asked for the span with the flag chose the cost, and hears nothing extra.

A verify flag given on --continue now sticks to the operation as it would on the first invocation – --verify=<cmd>, --verify-span and --no-verify-span alike. Before, a re-pause on a resume kept the state file as it stood, so the next plain --continue fell back to the original command and tier. A span tier asked for on a resume with no command in hand is refused before anything is rebuilt rather than recorded, since recorded it would refuse every later resume, and a multi-line --verify is refused up front, since a conflict pause persisted it truncated before any gate saw it.

--move takes several commits. Given more than once, it moves every commit it names to the anchor as one block, in their history order and in one replay – where moving them one at a time replayed the span, and under a standing edit.verifySpan verified it, once per commit. Commits lying between them stay where they are, so a commit another session landed in between is left alone. A value can also name a run, <oldest>..<newest>, both ends included. And a move right above the last pushed commit no longer asks for --allow-pushed: its anchor is never rewritten, but the pushed guard read it all the same.

An option that takes one value – --amend-into, --split, --onto, -s=, --after, --before, --tree, --text, --verify, -C/--dir – refuses to be given twice. The parser kept one value alone, so a fold given two targets landed on the second without a word, and a second --verify dropped the first check.

One fix: GIT_EDIT_VERIFY_COMMIT, documented as naming the commit under test, was never exported – a prefix assignment on the eval builtin does not reach the child it forks – so every verify command saw it unset. It reaches the command now, at the gate, at the counterpart run and on the climb, and a selftest insists on it.

emulate zsh now opens the script, with unalias -a behind it. zsh sources a caller's .zshenv for every script, so a setopt sh_word_split or an alias grep='grep --color=always' there ran a different tool than the selftest proves – the alias put a color escape into a parsed SHA. Every option that changes parsing is back at zsh's default, aliases are cleared, and the reorder mode's sequence editor, which git starts as a shell of its own, runs under sh. One consequence: a .zshenv alias no longer resolves as a verify command – a function or a script does. Functions stay, a git () wrapper there being deliberate.

Re-cut four times: on 22 September with the resume paragraph, then with the .zshenv hardening, and twice on the 23rd, with the moves and the first repeat refusals, then with those refusals extended to every option taking one value – none of which the earlier cuts carried.

brew install thomasbachem/tap/git-edit

Or brew upgrade git-edit where it is already installed, or pull the repo if its folder is on your PATH.