Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/transport-helper.c b/transport-helper.c
index d4683c4d0f..f828a6da68 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -127,6 +127,8 @@ static struct child_process *get_helper(struct transport *transport)
argv_array_pushf(&helper->env_array, "%s=%s",
GIT_DIR_ENVIRONMENT, get_git_dir());
+ helper->trace2_child_class = helper->args.argv[0]; /* "remote-<name>" */
+
code = start_command(helper);
if (code < 0 && errno == ENOENT)
die(_("unable to find remote helper for '%s'"), data->name);
@@ -421,7 +423,7 @@ static int get_importer(struct transport *transport, struct child_process *fasti
struct helper_data *data = transport->data;
int cat_blob_fd, code;
child_process_init(fastimport);
- fastimport->in = helper->out;
+ fastimport->in = xdup(helper->out);
argv_array_push(&fastimport->args, "fast-import");
argv_array_push(&fastimport->args, "--allow-unsafe-features");
argv_array_push(&fastimport->args, debug ? "--stats" : "--quiet");
@@ -852,6 +854,7 @@ static int push_refs_with_push(struct transport *transport,
{
int force_all = flags & TRANSPORT_PUSH_FORCE;
int mirror = flags & TRANSPORT_PUSH_MIRROR;
+ int atomic = flags & TRANSPORT_PUSH_ATOMIC;
struct helper_data *data = transport->data;
struct strbuf buf = STRBUF_INIT;
struct ref *ref;
@@ -871,6 +874,11 @@ static int push_refs_with_push(struct transport *transport,
case REF_STATUS_REJECT_NONFASTFORWARD:
case REF_STATUS_REJECT_STALE:
case REF_STATUS_REJECT_ALREADY_EXISTS:
+ if (atomic) {
+ string_list_clear(&cas_options, 0);
+ return 0;
+ } else
+ continue;
case REF_STATUS_UPTODATE:
continue;
default: