Merge branch 'js/transport-helper-error-reporting-fix' into fc/makefile
* js/transport-helper-error-reporting-fix:
git-remote-testgit: build it to run under $SHELL_PATH
git-remote-testgit: further remove some bashisms
git-remote-testgit: avoid process substitution
t5801: "VAR=VAL shell_func args" is forbidden
transport-helper: update remote helper namespace
transport-helper: trivial code shuffle
transport-helper: warn when refspec is not used
transport-helper: clarify pushing without refspecs
transport-helper: update refspec documentation
transport-helper: clarify *:* refspec
transport-helper: improve push messages
transport-helper: mention helper name when it dies
transport-helper: report errors properly
Conflicts:
t/t5801-remote-helpers.sh
grep "remote-helper doesn.t support push; refspec needed" error
'
test_expect_success 'pulling without marks' '
@ -186,6 +170,38 @@ test_expect_success GPG 'push signed tag with signed-tags capability' '
@@ -186,6 +170,38 @@ test_expect_success GPG 'push signed tag with signed-tags capability' '
compare_refs local signed-tag-2 server signed-tag-2
@ -217,6 +218,8 @@ static struct child_process *get_helper(struct transport *transport)
@@ -217,6 +218,8 @@ static struct child_process *get_helper(struct transport *transport)
for (i = 0; i < refspec_nr; i++)
free((char *)refspecs[i]);
free(refspecs);
} else if (data->import || data->bidi_import || data->export) {
warning("This remote helper should implement refspec capability.");
}
strbuf_release(&buf);
if (debug)
@ -473,7 +476,7 @@ static int fetch_with_import(struct transport *transport,
@@ -473,7 +476,7 @@ static int fetch_with_import(struct transport *transport,
* were fetching.
*
* (If no "refspec" capability was specified, for historical
* reasons we default to *:*.)
* reasons we default to the equivalent of *:*.)
*
* Store the result in to_fetch[i].old_sha1. Callers such
* as "git fetch" can use the value to write feedback to the
@ -540,7 +543,7 @@ static int process_connect_service(struct transport *transport,
@@ -540,7 +543,7 @@ static int process_connect_service(struct transport *transport,
goto exit;
sendline(data, &cmdbuf);
recvline_fh(input, &cmdbuf);
recvline_fh(input, &cmdbuf, name);
if (!strcmp(cmdbuf.buf, "")) {
data->no_disconnect_req = 1;
if (debug)
@ -622,7 +625,7 @@ static int fetch(struct transport *transport,
@@ -622,7 +625,7 @@ static int fetch(struct transport *transport,
update_ref("update by helper", private, ref->new_sha1, NULL, 0, 0);
free(private);
}
strbuf_release(&buf);
}
@ -789,6 +806,9 @@ static int push_refs_with_export(struct transport *transport,
@@ -789,6 +806,9 @@ static int push_refs_with_export(struct transport *transport,
die("remote-helper doesn't support push; refspec needed");
helper = get_helper(transport);
write_constant(helper->in, "export\n");
@ -799,8 +819,9 @@ static int push_refs_with_export(struct transport *transport,
@@ -799,8 +819,9 @@ static int push_refs_with_export(struct transport *transport,
char *private;
unsigned char sha1[20];
if (!data->refspecs)
continue;
if (ref->deletion)
die("remote-helpers do not support ref deletion");
@ -809,13 +830,8 @@ static int push_refs_with_export(struct transport *transport,
@@ -809,13 +830,8 @@ static int push_refs_with_export(struct transport *transport,
}
free(private);
if (ref->deletion) {
die("remote-helpers do not support ref deletion");