Justin Tobler <jltobler@xxxxxxxxx> writes: [snip] > Range-diff against v1: > 1: f659612c9d = 1: f659612c9d t5410: test receive-pack connectivity check > 2: 31e5f41983 ! 2: f6dbb02778 builtin/receive-pack: add option to skip connectivity check > @@ Commit message > During git-receive-pack(1), connectivity of the object graph is > validated to ensure that the received packfile does not leave the > repository in a broken state. This is done via git-rev-list(1) and > - walking the objects which can be expensive for large repositories. > + walking the objects, which can be expensive for large repositories. > > Generally, this check is critical to avoid an incomplete received > packfile from corrupting a repository. Server operators may have > additional knowledge though around exactly how Git is being used on the > server-side which can be used to facilitate more efficient connectivity > - computatation of incoming objects. > + computation of incoming objects. > > For example, if it can be ensured that all objects in a repository are > connected and do not depend on any missing objects, the connectivity of > @@ Documentation/git-receive-pack.adoc: OPTIONS > `--http-backend-info-refs` in linkgit:git-upload-pack[1]. > > +--skip-connectivity-check:: > -+ Bypasses the connectivity checks performed to validate incoming > -+ objects. This option exists for server operators that may want to > -+ implement their own object connectivity check outside of Git. This is > -+ useful in such cases where the server-side knows additional information > -+ about how Git is being used and thus can rely on guarantees to more > -+ efficiently compute object connectivity that Git itself cannot make. > -+ Usage of this option without a separate mechanism to validate and > -+ ensure incoming objects connect properly to the references risks a > -+ repository becoming corrupted and should not be used in the general > -+ case. > ++ Bypasses the connectivity checks that validate the existence of all > ++ objects in the transitive closure of reachable objects. This option is > ++ intended for server operators that want to implement their own object > ++ connectivity validation outside of Git. This is useful in such cases > ++ where the server-side knows additional information about how Git is > ++ being used and thus can rely on certain guarantees to more efficiently > ++ compute object connectivity that Git itself cannot make. Usage of this > ++ option without a reliable external mechanism to ensure full reachable > ++ object connectivity risks corrupting the repository and should not be > ++ used in the general case. > + > PRE-RECEIVE HOOK > ---------------- > @@ t/t5410-receive-pack.sh: test_expect_success 'receive-pack missing objects fails > + > + test_grep ! "missing necessary objects" actual && > + test_must_be_empty err && > -+ git -C remote.git cat-file -e $(git -C repo rev-parse HEAD) > ++ git -C remote.git cat-file -e $(git -C repo rev-parse HEAD) && > ++ test_must_fail git -C remote.git rev-list $(git -C repo rev-parse HEAD) > +' > + > test_done > > base-commit: 6c0bd1fc70efaf053abe4e57c976afdc72d15377 > -- > 2.49.0.111.g5b97a56fa0 The range-diff looks good, and seems to address the review comments from the previous iteration. The series looks good to me! Thanks, Karthik
Attachment:
signature.asc
Description: PGP signature