summaryrefslogtreecommitdiff
path: root/builtin-archive.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2007-04-09 17:12:53 +0200
committerJunio C Hamano <junkio@cox.net>2007-04-09 18:51:40 -0700
commit8ff21b1a3307c7059ea1e00b5117a50a2bc5fec8 (patch)
tree42ad4b42cd839195a95b427260975fd129566a41 /builtin-archive.c
parent5bcbc7ff1014c58e7296713926206bf6a69e0f4c (diff)
downloadgit-8ff21b1a3307c7059ea1e00b5117a50a2bc5fec8.tar.gz
git-archive: make tar the default format
As noted by Junio, --format=tar should be assumed if no format was specified. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-archive.c')
-rw-r--r--builtin-archive.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin-archive.c b/builtin-archive.c
index 8ea6cb1efc..7f4e409c99 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -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);