diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-11 14:56:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-11 14:56:59 -0700 |
commit | 2de0f39cd27d8ab8eae2e3430b81294f26252693 (patch) | |
tree | cf9fc811487dc0c43ceb4cdd6a9f5a330054c8e6 /builtin | |
parent | bb80ee09974667a1db6bbc5e33574ed869b76a88 (diff) | |
parent | f7c815c3eede201def87a643fdcad09a9af3e3e7 (diff) | |
download | git-2de0f39cd27d8ab8eae2e3430b81294f26252693.tar.gz git-2de0f39cd27d8ab8eae2e3430b81294f26252693.tar.xz |
Merge branch 'nd/push-no-thin'
"git push --no-thin" was a no-op by mistake.
* nd/push-no-thin:
push: respect --no-thin
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/push.c | 5 | ||||
-rw-r--r-- | builtin/receive-pack.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/builtin/push.c b/builtin/push.c index 50bbfd62b..7b1b66c36 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -15,7 +15,7 @@ static const char * const push_usage[] = { NULL, }; -static int thin; +static int thin = 1; static int deleterefs; static const char *receivepack; static int verbosity; @@ -315,8 +315,7 @@ static int push_with_options(struct transport *transport, int flags) if (receivepack) transport_set_option(transport, TRANS_OPT_RECEIVEPACK, receivepack); - if (thin) - transport_set_option(transport, TRANS_OPT_THIN, "yes"); + transport_set_option(transport, TRANS_OPT_THIN, thin ? "yes" : NULL); if (!is_empty_cas(&cas)) { if (!transport->smart_options) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 7434d9b4a..b7e71a04f 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -39,6 +39,7 @@ static int quiet; static int prefer_ofs_delta = 1; static int auto_update_server_info; static int auto_gc = 1; +static int fix_thin = 1; static const char *head_name; static void *head_name_to_free; static int sent_capabilities; @@ -870,7 +871,8 @@ static const char *unpack(int err_fd) keeper[i++] = "--stdin"; if (fsck_objects) keeper[i++] = "--strict"; - keeper[i++] = "--fix-thin"; + if (fix_thin) + keeper[i++] = "--fix-thin"; keeper[i++] = hdr_arg; keeper[i++] = keep_arg; keeper[i++] = NULL; @@ -976,6 +978,10 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) stateless_rpc = 1; continue; } + if (!strcmp(arg, "--reject-thin-pack-for-testing")) { + fix_thin = 0; + continue; + } usage(receive_pack_usage); } |