Skip to content

_grc_rebase_in_progress collapses could-not-tell into nothing-there #953

Closed

Description

@fdaviddpt

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

  1. added
    priority:low
    filed-by-loop
    lane-storage
    on Oct 7, 2026
  2. added 2 commits that reference this issue on Oct 7, 2026
  3. added a commit that references this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    filed-by-looplane-storagepriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions