Allow remote-helper/fast-import based transport to rename the refs
while transferring the history.
* fc/remote-helper-refmap:
transport-helper: remove unnecessary strbuf resets
transport-helper: add support to delete branches
fast-export: add support to delete refs
fast-import: add support to delete refs
transport-helper: add support to push symbolic refs
transport-helper: add support for old:new refspec
fast-export: add new --refspec option
fast-export: improve argument parsing
@ -483,6 +483,9 @@ Marks must be declared (via `mark`) before they can be used.
@@ -483,6 +483,9 @@ Marks must be declared (via `mark`) before they can be used.
* Any valid Git SHA-1 expression that resolves to a commit. See
``SPECIFYING REVISIONS'' in linkgit:gitrevisions[7] for details.
* The special null SHA-1 (40 zeros) specifies that the branch is to be
removed.
The special case of restarting an incremental import from the
@ -504,4 +504,22 @@ test_expect_success 'refs are updated even if no commits need to be exported' '
@@ -504,4 +504,22 @@ test_expect_success 'refs are updated even if no commits need to be exported' '
@ -850,7 +850,7 @@ static int push_refs_with_export(struct transport *transport,
@@ -850,7 +850,7 @@ static int push_refs_with_export(struct transport *transport,
@ -870,15 +870,10 @@ static int push_refs_with_export(struct transport *transport,
@@ -870,15 +870,10 @@ static int push_refs_with_export(struct transport *transport,
write_constant(helper->in, "export\n");
strbuf_reset(&buf);
for (ref = remote_refs; ref; ref = ref->next) {
char *private;
unsigned char sha1[20];
if (ref->deletion)
die("remote-helpers do not support ref deletion");
@ -888,15 +883,34 @@ static int push_refs_with_export(struct transport *transport,
@@ -888,15 +883,34 @@ static int push_refs_with_export(struct transport *transport,
free(private);
if (ref->peer_ref) {
if (strcmp(ref->peer_ref->name, ref->name))
die("remote-helpers do not support old:new syntax");