allod patch receive can continue after destination repo resolution failure #80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
allod patch receive <host>:<source-repo> <dest-repo>can continue after destination repo resolution fails and then apply/identity-check against the current working repo. This produces a misleading repo identity mismatch.Observed
From
~/work/allod/profiles:Output included:
Diagnosis
patch_receivecallspatch_applyunderset +eto capture its status. Insidepatch_apply, destination repo resolution is performed via command substitution (repo=$(resolve_git_repo ...)). Ifresolve_git_repocallsdie, the assignment fails but the function can continue whileerrexitis disabled by the caller. It then uses an empty repo path, sogit -C ""effectively checks the caller cwd, hereprofiles.This is a tooling bug, not a repository registry mismatch. A rebuild may update the installed tool, but the source still needs a hardening fix unless this was already fixed elsewhere.
Suggested Fix
<destination-repo>inpatch_receivebefore remote fetch begins, so bad destination paths fail before artifacts are fetched.patch_applyfail immediately whenresolve_git_repofails, even when called underset +e.