diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-12-05 20:02:42 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-10 16:14:17 -0800 |
commit | 48d25cae22667dfc2c31ad620172c0f0a3ac1490 (patch) | |
tree | 9e757eeeff528d48a7184c72675f838361537a42 /transport.h | |
parent | 79d3a236c551ad59719a6835bee03a1446296e65 (diff) | |
download | git-48d25cae22667dfc2c31ad620172c0f0a3ac1490.tar.gz |
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.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/transport.h b/transport.h index 59842d4994..02ea248db1 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. |