First class shallow clone
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest28 patches 1 replyIn review
- v328 patches 18 repliesSuperseded
- v216 patches 17 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 7 patches | 2 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/28 | transport.h: remove send_pack prototype, already defined in send-pack.htransport.h | +0 | 0 replies | |
| 2/28 | Replace struct extra_have_objects with struct sha1_arraybuiltin/ connect.c remote.h +3 more | +14 | 0 replies | |
| 3/28 | send-pack: forbid pushing from a shallow repositorybuiltin/ | +3 | 0 replies | |
| 4/28 | clone: prevent --reference to a shallow repositorybuiltin/ | +6 | 0 replies | |
| 5/28 | Make the sender advertise shallow commits to the receiverDocumentation/ builtin/ commit.h +2 more | +26 | 0 replies | |
| 6/28 | connect.c: teach get_remote_heads to parse "shallow" linesbuiltin/ builtin/ connect.c +3 more | +20 | 0 replies | |
| 7/28 | shallow.c: extend setup_*_shallow() to accept extra shallow commitscommit.h fetch-pack.c shallow.c +1 more | +24 | 0 replies | |
| 8/28 | shallow.c: the 8 steps to select new commits for .git/shallowcache.h commit.h shallow.c +1 more | +90 | 0 replies | |
| 9/28 | shallow.c: steps 6 and 7 to select new commits for .git/shallowcommit.h shallow.c | +298 | 0 replies | |
| 10/28 | fetch-pack.c: move shallow update code out of fetch_pack()fetch-pack.c | +13 | 0 replies | |
| 11/28 | fetch-pack.h: one statement per bitfield declarationfetch-pack.h | +12 | 0 replies | |
| 12/28 | clone: support remote shallow repositorybuiltin/ builtin/ fetch-pack.c +3 more | +71 | 0 replies | |
| 13/28 | fetch: support fetching from a shallow repositorybuiltin/ fetch-pack.c remote.h +2 more | +176 | 0 replies | |
| 14/28 | upload-pack: make sure deepening preserves shallow rootsDocumentation/ shallow.c t/ +1 more | +28 | 0 replies | |
| 15/28 | fetch: add --update-shallow to accept refs that update .git/shallowDocumentation/ builtin/ fetch-pack.c +4 more | +79 | 0 replies | |
| 16/28 | receive-pack: reorder some code in unpack()builtin/ | +30 | 0 replies | |
| 17/28 | receive/send-pack: support pushing from a shallow cloneDocumentation/ builtin/ builtin/ +2 more | +146 | 0 replies | |
| 18/28 | New var GIT_SHALLOW_FILE to propagate --shallow-file to subprocessescache.h commit.h environment.c +2 more | +12 | 0 replies | |
| 19/28 | connected.c: add new variant that runs with --shallow-fileconnected.c connected.h | +36 | 0 replies | |
| 20/28 | receive-pack: allow pushes that update .git/shallowDocumentation/ builtin/ commit.h +2 more | +201 | 0 replies | |
| 21/28 | send-pack: support pushing to a shallow clonebuiltin/ t/ transport.c | +43 | 0 replies | |
| 22/28 | remote-curl: pass ref SHA-1 to fetch-pack as wellbuiltin/ remote-curl.c | +9 | 0 replies | |
| 23/28 | Support shallow fetch/clone over smart-httpDocumentation/ builtin/ remote-curl.c +3 more | +82 | 3 replies | |
| 24/28 | receive-pack: support pushing to a shallow clone via httpbuiltin/ t/ | +35 | 0 replies | |
| 25/28 | send-pack: support pushing from a shallow clone via httpbuiltin/ send-pack.c t/ | +42 | 0 replies | |
| 26/28 | clone: use git protocol for cloning shallow repo locallybuiltin/ t/ | +16 | 0 replies | |
| 27/28 | prune: clean .git/shallow after pruning objectsDocumentation/ builtin/ builtin/ +3 more | +71 | 0 replies | |
| 28/28 | git-clone.txt: remove shallow clone limitationsDocumentation/ | +1 | 0 replies |
Reviews trailers per patch
None of the 28 patches has a Reviewed-by or Acked-by.
| Patch | Jeff King |
|---|---|
| 1/28 | |
| 2/28 | |
| 3/28 | |
| 4/28 | |
| 5/28 | |
| 6/28 | |
| 7/28 | |
| 8/28 | |
| 9/28 | |
| 10/28 | |
| 11/28 | |
| 12/28 | |
| 13/28 | |
| 14/28 | |
| 15/28 | |
| 16/28 | |
| 17/28 | |
| 18/28 | |
| 19/28 | |
| 20/28 | |
| 21/28 | |
| 22/28 | |
| 23/28 | Noticed-by |
| 24/28 | |
| 25/28 | |
| 26/28 | |
| 27/28 | |
| 28/28 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 00/28] First class shallow clone
This reroll should fix all comments I have received in v3. I reordered the shallow checks a bit so in common case it should be as cheap as a normal fetch or push. See 08/28 and 20/28 for the big picture. I'm not entirely happy with the hook issue in 20/28, but it looks good enough for me. There are a few XXXes for further improvement, but I'll keep them until this lands.
To recap, this series allows you to clone from a shallow repo, push to or fetch from any shallow repo. Normally it will reject new refs that introduce new shallow boundaries to your repository, so if you're in a full clone, it will always stay a full clone. Use "fetch --update-shallow" or set receive.shallowupdate to accept those refs.
Nguyễn Thái Ngọc Duy (28):
transport.h: remove send_pack prototype, already defined in send-pack.h Replace struct extra_have_objects with struct sha1_array
send-pack: forbid pushing from a shallow repository
clone: prevent --reference to a shallow repository
Make the sender advertise shallow commits to the receiver connect.c: teach get_remote_heads to parse "shallow" lines shallow.c: extend setup_*_shallow() to accept extra shallow commits shallow.c: the 8 steps to select new commits for .git/shallow shallow.c: steps 6 and 7 to select new commits for .git/shallow fetch-pack.c: move shallow update code out of fetch_pack() fetch-pack.h: one statement per bitfield declaration
clone: support remote shallow repository
fetch: support fetching from a shallow repository
upload-pack: make sure deepening preserves shallow roots
fetch: add --update-shallow to accept refs that update .git/shallow
receive-pack: reorder some code in unpack() receive/send-pack: support pushing from a shallow clone
New var GIT_SHALLOW_FILE to propagate --shallow-file to subprocesses connected.c: add new variant that runs with --shallow-file
receive-pack: allow pushes that update .git/shallow
send-pack: support pushing to a shallow clone
remote-curl: pass ref SHA-1 to fetch-pack as well
Support shallow fetch/clone over smart-http
receive-pack: support pushing to a shallow clone via http
send-pack: support pushing from a shallow clone via http
clone: use git protocol for cloning shallow repo locally
prune: clean .git/shallow after pruning objects git-clone.txt: remove shallow clone limitations
Documentation/config.txt | 4 + Documentation/fetch-options.txt | 14 +- Documentation/git-clone.txt | 7 +- Documentation/git-prune.txt | 2 + Documentation/gitremote-helpers.txt | 7 + Documentation/technical/pack-protocol.txt | 7 +- builtin/clone.c | 18 +- builtin/fetch-pack.c | 23 +- builtin/fetch.c | 15 +- builtin/gc.c | 1 + builtin/prune.c | 4 + builtin/receive-pack.c | 314 +++++++++++++++---- builtin/send-pack.c | 9 +- cache.h | 3 + commit.h | 39 ++- connect.c | 22 +- connected.c | 42 ++- connected.h | 2 + environment.c | 6 + fetch-pack.c | 132 +++++++- fetch-pack.h | 29 +- git.c | 2 +- remote-curl.c | 34 ++- remote.h | 9 +- send-pack.c | 27 +- send-pack.h | 2 +- shallow.c | 486 +++++++++++++++++++++++++++++- t/t5304-prune.sh | 10 + t/t5536-fetch-shallow.sh (new +x) | 203 +++++++++++++ t/t5537-push-shallow.sh (new +x) | 183 +++++++++++ t/t5601-clone.sh | 7 + trace.c | 2 +- transport-helper.c | 6 + transport.c | 25 +- transport.h | 16 +- upload-pack.c | 8 +- 36 files changed, 1555 insertions(+), 165 deletions(-) create mode 100755 t/t5536-fetch-shallow.sh create mode 100755 t/t5537-push-shallow.sh
Signature · 1 line
1.8.5.1.25.g8667982