When passing both --remote and --output to git-archive, initialize the archivers before attempting to determine the format from the output filename. Without initialization, the format cannot be determined. Signed-off-by: Josh Steadmon <steadmon@xxxxxxxxxx> --- builtin/archive.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/archive.c b/builtin/archive.c index e74f675390..dd3283a247 100644 --- a/builtin/archive.c +++ b/builtin/archive.c @@ -45,7 +45,10 @@ static int run_remote_archiver(int argc, const char **argv, * it. */ if (name_hint) { - const char *format = archive_format_from_filename(name_hint); + const char *format; + init_tar_archiver(); + init_zip_archiver(); + format = archive_format_from_filename(name_hint); if (format) packet_write_fmt(fd[1], "argument --format=%s\n", format); } -- 2.19.1.568.g152ad8e336-goog