Commit ad52a59
committed
git-remote-entire: relay helper-status before send-pack exit check
send-pack exits non-zero on per-ref rejections (D/F conflict, protected
branch, server hook decline). The buffered `error refs/X <reason>` lines
are what git's transport-helper.c reads to render the user-visible
`! [remote rejected]` output. Forwarding helper-status only on the happy
path meant Wait/feed errors swallowed those lines, leaving users with
only `send-pack exited with error: exit status 1`.
Relay helper-status before checking exit codes so the real reason
reaches the user. Examples now surfaced:
Branch protection violation
! [remote rejected] branch-test -> branch-test (upstream: push declined due to repository rule violations)
error: failed to push some refs to 'X'
Invalid ref:
! [remote rejected] test-prefix -> test-prefix (ref name conflicts with an existing ref namespace)
error: failed to push some refs to 'X'
Permissions:
! [remote rejected] new-test/repo -> new-test/repo (pushing to GitHub: tracing transport: handshake: http transport: authorization failed: unexpected requesting "https://github.com/x/x/info/refs?service=git-receive-pack" status code: 403: Permission to x/x.git denied to <user>.)
error: failed to push some refs to 'X'
Assisted-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Paulo Gomes <paulo@entire.io>
Entire-Checkpoint: 25d3ab26f5711 parent 9ac4c6c commit ad52a59
1 file changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
154 | 168 | | |
155 | 169 | | |
156 | 170 | | |
| |||
160 | 174 | | |
161 | 175 | | |
162 | 176 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
| |||
0 commit comments