summaryrefslogtreecommitdiff
path: root/builtin-upload-archive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-16 17:12:18 -0700
committerJunio C Hamano <gitster@pobox.com>2008-07-16 17:12:18 -0700
commite75bf76f5462af4185d8260f6feecf24dd24a516 (patch)
treef079b41f350ea291f968ad531298053212c15922 /builtin-upload-archive.c
parent1c7ac06dc612c469d74be6be8164465d65a7829a (diff)
parent489e351ea03e78746bad0c0ad4fcf4a63920256d (diff)
downloadgit-e75bf76f5462af4185d8260f6feecf24dd24a516.tar.gz
Merge branch 'rs/archive'
* rs/archive: archive: remove extra arguments parsing code archive: unify file attribute handling archive: centralize archive entry writing archive: add baselen member to struct archiver_args add context pointer to read_tree_recursive() archive: remove args member from struct archiver
Diffstat (limited to 'builtin-upload-archive.c')
-rw-r--r--builtin-upload-archive.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/builtin-upload-archive.c b/builtin-upload-archive.c
index 371400d49a..295e24c2fa 100644
--- a/builtin-upload-archive.c
+++ b/builtin-upload-archive.c
@@ -19,7 +19,8 @@ static const char lostchild[] =
static int run_upload_archive(int argc, const char **argv, const char *prefix)
{
- struct archiver ar;
+ const struct archiver *ar;
+ struct archiver_args args;
const char *sent_argv[MAX_ARGS];
const char *arg_cmd = "argument ";
char *p, buf[4096];
@@ -65,12 +66,12 @@ static int run_upload_archive(int argc, const char **argv, const char *prefix)
sent_argv[sent_argc] = NULL;
/* parse all options sent by the client */
- treeish_idx = parse_archive_args(sent_argc, sent_argv, &ar);
+ treeish_idx = parse_archive_args(sent_argc, sent_argv, &ar, &args);
- parse_treeish_arg(sent_argv + treeish_idx, &ar.args, prefix);
- parse_pathspec_arg(sent_argv + treeish_idx + 1, &ar.args);
+ parse_treeish_arg(sent_argv + treeish_idx, &args, prefix);
+ parse_pathspec_arg(sent_argv + treeish_idx + 1, &args);
- return ar.write_archive(&ar.args);
+ return ar->write_archive(&args);
}
static void error_clnt(const char *fmt, ...)