]> git.ipfire.org Git - thirdparty/git.git/commit - transport.c
fetch: support fetching from a shallow repository
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 5 Dec 2013 13:02:40 +0000 (20:02 +0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Dec 2013 00:14:17 +0000 (16:14 -0800)
commit4820a33baa963c4559736d7a1c4c35f8dcb37293
tree5f812013eb41e5f3ab6bd1b5db2010485b5b0c75
parentbeea4152d94cf7c77eeb6b226805b315d22b3a2f
fetch: support fetching from a shallow repository

This patch just put together pieces from the 8 steps patch. We stop at
step 7 and reject refs that require new shallow commits.

Note that, by rejecting refs that require new shallow commits, we
leave dangling objects in the repo, which become "object islands" by
the next "git fetch" of the same source.

If the first fetch our "ours" set is zero and we do practically
nothing at step 7, "ours" is full at the next fetch and we may need to
walk through commits for reachability test. Room for improvement.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
fetch-pack.c
remote.h
t/t5537-fetch-shallow.sh [new file with mode: 0755]
transport.c