From: Junio C Hamano Date: Mon, 16 Jun 2014 19:18:15 +0000 (-0700) Subject: Merge branch 'fc/remote-helper-refmap' X-Git-Tag: v2.1.0-rc0~114 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c9fc3a6ac5011ce03e8132973687d1242807dc6c Merge branch 'fc/remote-helper-refmap' 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 --- c9fc3a6ac5011ce03e8132973687d1242807dc6c diff --cc transport-helper.c index 4cfb8f3a4a,a90094d4a3..84c616f180 --- a/transport-helper.c +++ b/transport-helper.c @@@ -897,17 -915,11 +909,19 @@@ static int push_refs_with_export(struc if (get_exporter(transport, &exporter, &revlist_args)) die("Couldn't run fast-export"); + string_list_clear(&revlist_args, 1); + if (finish_command(&exporter)) die("Error while running fast-export"); - push_update_refs_status(data, remote_refs, flags); + if (push_update_refs_status(data, remote_refs, flags)) + return 1; + + if (data->export_marks) { + strbuf_addf(&buf, "%s.tmp", data->export_marks); + rename(buf.buf, data->export_marks); + strbuf_release(&buf); + } + return 0; }