Code

git-stash: don't complain when listing in a repo with no stash
[git.git] / builtin-archive.c
index 8ea6cb1efc4f988fb09051852f9e51fc88b5efd7..187491bc172571b783a0be4f4dfa3d94d58bb0fe 100644 (file)
@@ -45,7 +45,7 @@ static int run_remote_archiver(const char *remote, int argc,
        }
 
        url = xstrdup(remote);
-       pid = git_connect(fd, url, exec);
+       pid = git_connect(fd, url, exec, 0);
        if (pid < 0)
                return pid;
 
@@ -149,7 +149,7 @@ int parse_archive_args(int argc, const char **argv, struct archiver *ar)
 {
        const char *extra_argv[MAX_EXTRA_ARGS];
        int extra_argc = 0;
-       const char *format = NULL; /* might want to default to "tar" */
+       const char *format = "tar";
        const char *base = "";
        int verbose = 0;
        int i;
@@ -190,8 +190,6 @@ int parse_archive_args(int argc, const char **argv, struct archiver *ar)
        /* We need at least one parameter -- tree-ish */
        if (argc - 1 < i)
                usage(archive_usage);
-       if (!format)
-               die("You must specify an archive format");
        if (init_archiver(format, ar) < 0)
                die("Unknown archive format '%s'", format);