Skip to content

work around "transport-take-over" hack

Junio C Hamano git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5t5802: add test for connect helpert/t5802-connect-helper.sh+72 -00 replies
2/5fetch: rename file-scope global "transport" to "gtransport"builtin/fetch.c+11 -110 replies
3/5fetch: refactor code that prepares a transportbuiltin/fetch.c+26 -200 replies
4/5fetch: refactor code that fetches leftover tagsbuiltin/fetch.c+9 -50 replies
5/5fetch: work around "transport-take-over" hackbuiltin/fetch.c transport.c transport.h+21 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] work around "transport-take-over" hack

"git fetch" sometimes needs to make a real request to the transport after a single "fetch_refs" request, in order to follow tags that the other end should have sent as part of the primary transfer with "follow-tags" request.

However, a transport that defines "connect" has a gross hack that destroys its internal state to render it unusable after processing a single request, breaking this.

This is my attempt to work it around. I am not too proud of it, but after trying two other approaches to fix it closer to the real cause (i.e. the implementation of Git-aware transport helper) and seeing that both of them ended up being even less appealing and not worth posting, I think this is probably the best fix to the issue.

Junio C Hamano (5):
t5802: add test for connect helper
fetch: rename file-scope global "transport" to "gtransport"
fetch: refactor code that prepares a transport
fetch: refactor code that fetches leftover tags
fetch: work around "transport-take-over" hack

 builtin/fetch.c           | 85 ++++++++++++++++++++++++++++++-----------------
 t/t5802-connect-helper.sh | 72 +++++++++++++++++++++++++++++++++++++++
 transport.c               |  2 ++
 transport.h               |  6 ++++
 4 files changed, 134 insertions(+), 31 deletions(-)
 create mode 100755 t/t5802-connect-helper.sh
Signature · 1 line
1.8.4-rc1-210-gf6d87e2