Merge branch 'jk/readme-gmane-is-no-more' into maint
[gitweb.git] / builtin / archive.c
index a1e3b940c25ac20927d4daefa417d5b626e38a24..f863465a0fa137f3446071a0ec1653adad536fdc 100644 (file)
@@ -47,10 +47,10 @@ static int run_remote_archiver(int argc, const char **argv,
        if (name_hint) {
                const char *format = archive_format_from_filename(name_hint);
                if (format)
-                       packet_write(fd[1], "argument --format=%s\n", format);
+                       packet_write_fmt(fd[1], "argument --format=%s\n", format);
        }
        for (i = 1; i < argc; i++)
-               packet_write(fd[1], "argument %s\n", argv[i]);
+               packet_write_fmt(fd[1], "argument %s\n", argv[i]);
        packet_flush(fd[1]);
 
        buf = packet_read_line(fd[0], NULL);
@@ -85,8 +85,8 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
        const char *output = NULL;
        const char *remote = NULL;
        struct option local_opts[] = {
-               OPT_STRING('o', "output", &output, N_("file"),
-                       N_("write the archive to this file")),
+               OPT_FILENAME('o', "output", &output,
+                            N_("write the archive to this file")),
                OPT_STRING(0, "remote", &remote, N_("repo"),
                        N_("retrieve the archive from remote repository <repo>")),
                OPT_STRING(0, "exec", &exec, N_("command"),
@@ -105,5 +105,5 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
 
        setvbuf(stderr, NULL, _IOLBF, BUFSIZ);
 
-       return write_archive(argc, argv, prefix, 1, output, 0);
+       return write_archive(argc, argv, prefix, output, 0);
 }