summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 20:02:40 +0700
committerJunio C Hamano <gitster@pobox.com>2013-12-10 16:14:17 -0800
commit4820a33baa963c4559736d7a1c4c35f8dcb37293 (patch)
tree5f812013eb41e5f3ab6bd1b5db2010485b5b0c75 /remote.h
parentbeea4152d94cf7c77eeb6b226805b315d22b3a2f (diff)
downloadgit-4820a33baa963c4559736d7a1c4c35f8dcb37293.tar.gz
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>
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/remote.h b/remote.h
index 5d217d5397..3498091e9a 100644
--- a/remote.h
+++ b/remote.h
@@ -109,6 +109,7 @@ struct ref {
REF_STATUS_REJECT_FETCH_FIRST,
REF_STATUS_REJECT_NEEDS_FORCE,
REF_STATUS_REJECT_STALE,
+ REF_STATUS_REJECT_SHALLOW,
REF_STATUS_UPTODATE,
REF_STATUS_REMOTE_REJECT,
REF_STATUS_EXPECTING_REPORT