Closed
Closed
Copy link
Labels
scriptA defect in hub tooling
Description
Context
A local review of the change closing #2962 found these. Develop's guard reads both the same way, and the fix for #2962 changes only the local branch read. Neither has been run against git itself, so each rests on git's documented --abbrev-ref behavior.
A Remote-Tracking Push Target Can Lose More or Less Than Its Remote
_read_branch strips the first / segment from the @{push} read as the remote name. Two shapes break that:
- A local branch named like a remote-tracking ref, such as
origin/develop, makes--abbrev-refprintremotes/origin/developfor the real remote-tracking ref, which strips toorigin/develop. A bare push underpush.default=upstreamwith upstreamorigin/developis then checked against the rules fororigin/develop, finds none, and passes, though it updatesdevelop. - A remote whose name holds a slash, such as
up/stream, stripsup/stream/developtostream/develop.
Possible Direction
Also read the name with a leading remotes/<remote>/ stripped. For a slash-named remote, resolve the remote names with git remote and strip the longest one that matches, or read --symbolic-full-name without --abbrev-ref and match it against refs/remotes/<remote>/.
Metadata
Metadata
Assignees
Labels
scriptA defect in hub tooling
Activity
Deny Include Overrides on Commits, Command-Running Subcommands, and N…
ptr727 commentedon Oct 14, 2026
Claim (engineering round 25, push-target guard lane with #3005, #3007, #2973): branch
feature/guard-push-targets, fileshost-setup/agent-safety/claude/gh-write-guard.pyandhost-setup/agent-safety/claude/test_install.py.ptr727 commentedon Oct 14, 2026
Claim update: the push-target guard lane branch is
feature/3005-3007-2973-guard-push-targets(renamed before its first push, sincefeature/guard-push-targetswas the head of merged #3011). Files unchanged.Read Completed, Pruned, and Slash-Remote Push Targets in the Write Gu…