aboutsummaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-12-05 20:02:42 +0700
committerJunio C Hamano <gitster@pobox.com>2013-12-10 16:14:17 -0800
commit48d25cae22667dfc2c31ad620172c0f0a3ac1490 (patch)
tree9e757eeeff528d48a7184c72675f838361537a42 /transport.h
parent79d3a236c551ad59719a6835bee03a1446296e65 (diff)
downloadgit-48d25cae22667dfc2c31ad620172c0f0a3ac1490.tar.gz
git-48d25cae22667dfc2c31ad620172c0f0a3ac1490.tar.xz
fetch: add --update-shallow to accept refs that update .git/shallow
The same steps are done as in when --update-shallow is not given. The only difference is we now add all shallow commits in "ours" and "theirs" to .git/shallow (aka "step 8"). 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 'transport.h')
-rw-r--r--transport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/transport.h b/transport.h
index 59842d499..02ea248db 100644
--- a/transport.h
+++ b/transport.h
@@ -11,6 +11,7 @@ struct git_transport_options {
unsigned followtags : 1;
unsigned check_self_contained_and_connected : 1;
unsigned self_contained_and_connected : 1;
+ unsigned update_shallow : 1;
int depth;
const char *uploadpack;
const char *receivepack;
@@ -152,6 +153,9 @@ struct transport *transport_get(struct remote *, const char *);
/* Aggressively fetch annotated tags if possible */
#define TRANS_OPT_FOLLOWTAGS "followtags"
+/* Accept refs that may update .git/shallow without --depth */
+#define TRANS_OPT_UPDATE_SHALLOW "updateshallow"
+
/**
* Returns 0 if the option was used, non-zero otherwise. Prints a
* message to stderr if the option is not used.