Repository navigation
Description
From self-review on #946 (foreign-rebase decline guard), re-checked against current HEAD while curating trap.d/ (2026-10-07) -- still true.
hooks.d/after_save/60-git-reconcile.sh:353-371, _grc_rebase_in_progress (unchanged by #946) returns a plain false ("not in progress") both when .git/rebase-merge/rebase-apply genuinely does not exist AND when the underlying git rev-parse --path-format=absolute --git-path ... call itself fails for some unrelated reason (e.g. git binary trouble, a corrupt .git directory read error) -- a "could not tell" collapses into "nothing there."
Traced consequence for #946's two new pre-check call sites (lines ~527, ~554): non-destructive today -- a false negative there only lets the hook go on to attempt its own git rebase, which then either succeeds or fails for the same underlying reason, landing in the harmless "WARNING ... failed to start ... no-op" branch rather than the destructive rebase --quit + scoped-checkout branch (only reached when the SAME function returns true, at the pre-existing post-check around line 581, after the hook's own rebase call has already failed). So the worst observed consequence today is a misleading log line ("declined" vs. "failed to start"), not data loss.
Not unique to #946's own new call sites -- it is a property of the pre-existing, unchanged function that every one of its call sites (lines 353/490/569/581, plus 527/554) inherits alike.
What would settle it: distinguish "directory does not exist" (git-path call succeeded, -d test false) from "could not determine" (the git-path call itself failed, non-zero exit) inside _grc_rebase_in_progress, and decide -- as a design question, not a mechanical one -- whether the undetermined case should behave like "in progress" (safer default: decline/report rather than proceed) or surface its own distinct log line. Worth doing as a class across all call sites rather than a one-off patch.
Original fragment: trap.d/946.rebase-in-progress-collapses-could-not-tell-into-nothing-there.md (deleted by this same curate pass).
[AI-generated]
Activity
curate: promote 2 rules, decline 11 fragments (5 new issues, 3 alread…
fix(#951): fast-path tests now carry positive mktemp evidence (#961)
fix(#962): avoid bash 4.0+ mapfile in the git-reconcile scoped restore
curate: promote 1 rule, decline 10 fragments (5 new issues, 1 stale) (#…
fix(Digital-Process-Tools#952,Digital-Process-Tools#953): close three…