git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail.com>
To: git@vger.kernel.org
Cc: ps@pks.im, karthik.188@gmail.com, Justin Tobler <jltobler@gmail.com>
Subject: [PATCH 0/2] builtin/receive-pack: introduce option to skip connectivity checks
Date: Mon, 19 May 2025 20:49:18 -0500	[thread overview]
Message-ID: <20250520014920.201736-1-jltobler@gmail.com> (raw)
In-Reply-To: <20250507030249.4802-1-jltobler@gmail.com>

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.

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.

Thanks for taking a look.

Changes since V1:
        - Instead of creating a new test file, t5410 is generalized.
        - Test assertions updated to more explicitly check for object
          connectivity error messages.
        - Updated commit message and added documentation for the option.

-Justin

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

 Documentation/git-receive-pack.adoc | 12 ++++
 builtin/receive-pack.c              | 40 ++++++++------
 t/meson.build                       |  2 +-
 t/t5410-receive-pack-alternates.sh  | 44 ---------------
 t/t5410-receive-pack.sh             | 86 +++++++++++++++++++++++++++++
 5 files changed, 121 insertions(+), 63 deletions(-)
 delete mode 100755 t/t5410-receive-pack-alternates.sh
 create mode 100755 t/t5410-receive-pack.sh


base-commit: 6c0bd1fc70efaf053abe4e57c976afdc72d15377
-- 
2.49.0.111.g5b97a56fa0


  parent reply	other threads:[~2025-05-20  1:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07  3:02 [RFC PATCH 0/2] builtin/receive-pack: introduce option to skip connectivity checks Justin Tobler
2025-05-07  3:02 ` [RFC PATCH 1/2] t5412: test receive-pack connectivity check Justin Tobler
2025-05-07 13:28   ` Patrick Steinhardt
2025-05-19 21:08     ` Justin Tobler
2025-05-07  3:02 ` [RFC PATCH 2/2] builtin/receive-pack: add option to skip " Justin Tobler
2025-05-07 13:28   ` Patrick Steinhardt
2025-05-07 17:20     ` Junio C Hamano
2025-05-20  1:49 ` Justin Tobler [this message]
2025-05-20  1:49   ` [PATCH 1/2] t5410: test receive-pack " Justin Tobler
2025-05-20  9:11     ` Karthik Nayak
2025-05-20  1:49   ` [PATCH 2/2] builtin/receive-pack: add option to skip " Justin Tobler
2025-05-20  5:17     ` Patrick Steinhardt
2025-05-20 15:10       ` Justin Tobler
2025-05-20  9:16     ` Karthik Nayak
2025-05-20 16:32   ` [PATCH v2 0/2] builtin/receive-pack: introduce option to skip connectivity checks Justin Tobler
2025-05-20 16:32     ` [PATCH v2 1/2] t5410: test receive-pack connectivity check Justin Tobler
2025-05-20 16:32     ` [PATCH v2 2/2] builtin/receive-pack: add option to skip " Justin Tobler
2025-06-02 15:01       ` Johannes Schindelin
2025-06-02 15:59         ` Justin Tobler
2025-06-02 16:06           ` Johannes Schindelin
2025-06-02 18:16             ` Junio C Hamano
2025-06-03 12:40           ` Patrick Steinhardt
2025-06-05 10:17             ` Johannes Schindelin
2025-06-05 11:00               ` Patrick Steinhardt
2025-05-22  9:09     ` [PATCH v2 0/2] builtin/receive-pack: introduce option to skip connectivity checks Karthik Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250520014920.201736-1-jltobler@gmail.com \
    --to=jltobler@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).