Skip to content

RFC builtin/receive-pack: introduce option to skip connectivity checks

Justin Tobler git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2t5412: test receive-pack connectivity checkt/meson.build t/t5412-receive-pack.sh+28 -02 replies
1/2t5410: test receive-pack connectivity checkt/meson.build t/t5410-receive-pack.sh+23 -21 reply
2/2builtin/receive-pack: add option to skip connectivity checkbuiltin/receive-pack.c t/t5412-receive-pack.sh+42 -182 replies
2/2builtin/receive-pack: add option to skip connectivity checkDocumentation/git-receive-pack.adoc builtin/receive-pack.c t/t5410-receive-pack.sh+55 -183 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 0/2] builtin/receive-pack: introduce option to skip connectivity checks

Greetings,

At GitLab, we are interested in introducing an optional means to bypass the connectivity checks performed through git-receive-pack(1). This series implements a --skip-connectivity-check option to facilitate this. I'm interested in collecting some thoughts before pursuing further though.

For some background, we have a transaction management system that runs in our Git RPC service and wraps all repository operations. Operations that write to a repository are first recorded and staged outside of the repository. When committing a transaction, the connectivity of newly written objects is checked by walking the object graph containing only the new objects from the updated tips and identifying the missing objects which represent the boundary between the new objects and the repository. The boundary objects are then checked in the canonical repository to ensure the new objects will connect as expected. All repository operations are run in a transaction and conflict checked before being applied serially to the canonical repository. This ensures that operations that would break the repository are not applied.

For our specific use case, the conflict checks performed by git-receive-pack(1) are redundant and thus we would like to introduce an option that allows connectivity checks to be skipped.

One concern I see could be the --receive-pack flag for git-push(1) or the remote.<name>.receivepack option which configures the receive-pack program that gets executed on the remote side for some protocols. This could provide a way for users to enable such a flag if the remote doesn't protect against arbitrary arguments being added. I don't think git-shell(1) would protect against this, so maybe instead of a flag a config option could be used or an ENV var?

Thanks for taking a look.

-Justin

Justin Tobler (2):
t5412: test receive-pack connectivity check builtin/receive-pack: add option to skip connectivity check

 builtin/receive-pack.c  | 40 +++++++++++++++++++----------------
 t/meson.build           |  1 +
 t/t5412-receive-pack.sh | 47 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 18 deletions(-)
 create mode 100755 t/t5412-receive-pack.sh

base-commit: 6c0bd1fc70efaf053abe4e57c976afdc72d15377

Signature · 1 line
2.49.0.111.g5b97a56fa0