]> git.ipfire.org Git - thirdparty/git.git/commit - shallow.c
upload-pack: make sure deepening preserves shallow roots
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 5 Dec 2013 13:02:41 +0000 (20:02 +0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Dec 2013 00:14:17 +0000 (16:14 -0800)
commit79d3a236c551ad59719a6835bee03a1446296e65
treea23554e47b3d83df429dda8e9fbe7c33a1b8cb58
parent4820a33baa963c4559736d7a1c4c35f8dcb37293
upload-pack: make sure deepening preserves shallow roots

When "fetch --depth=N" where N exceeds the longest chain of history in
the source repo, usually we just send an "unshallow" line to the
client so full history is obtained.

When the source repo is shallow we need to make sure to "unshallow"
the current shallow point _and_ "shallow" again when the commit
reaches its shallow bottom in the source repo.

This should fix both cases: large <N> and --unshallow.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/fetch-options.txt
shallow.c
t/t5537-fetch-shallow.sh
upload-pack.c