summaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-09-12 14:41:41 -0700
committerJunio C Hamano <gitster@pobox.com>2013-09-12 14:41:41 -0700
commit100ce1c543b8e9961ed59c047b902da1dd649666 (patch)
tree41b16b5ca4c390f2109707cd234e62d6c3f9f339 /transport-helper.c
parentaf9a0cade37d1c52291527d82a6f5449798baa98 (diff)
parentf19f5e60f618481a8ddb329a95a5edeecf218a29 (diff)
downloadgit-100ce1c543b8e9961ed59c047b902da1dd649666.tar.gz
Merge branch 'mm/mediawiki-dumb-push-fix'
* mm/mediawiki-dumb-push-fix: git-remote-mediawiki: no need to update private ref in non-dumb push git-remote-mediawiki: use no-private-update capability on dumb push transport-helper: add no-private-update capability git-remote-mediawiki: add test and check Makefile targets
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 4c2a39e8ff..b32e2d64dd 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -28,7 +28,8 @@ struct helper_data {
connect : 1,
signed_tags : 1,
check_connectivity : 1,
- no_disconnect_req : 1;
+ no_disconnect_req : 1,
+ no_private_update : 1;
char *export_marks;
char *import_marks;
/* These go from remote name (as in "list") to private name */
@@ -208,6 +209,8 @@ static struct child_process *get_helper(struct transport *transport)
strbuf_addstr(&arg, "--import-marks=");
strbuf_addstr(&arg, capname + strlen("import-marks "));
data->import_marks = strbuf_detach(&arg, NULL);
+ } else if (!prefixcmp(capname, "no-private-update")) {
+ data->no_private_update = 1;
} else if (mandatory) {
die("Unknown mandatory capability %s. This remote "
"helper probably needs newer version of Git.",
@@ -738,7 +741,7 @@ static void push_update_refs_status(struct helper_data *data,
if (push_update_ref_status(&buf, &ref, remote_refs))
continue;
- if (!data->refspecs)
+ if (!data->refspecs || data->no_private_update)
continue;
/* propagate back the update to the remote namespace */