summaryrefslogtreecommitdiff
path: root/builtin-archive.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2008-07-15 09:49:38 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-15 07:18:04 -0700
commitd53fe8187c38a5a160ef2199a899d9c47ec881b9 (patch)
treee692814e75ece9695971380addbdb67ec983bb69 /builtin-archive.c
parent671f0707212c929533dc6ec9e032faee328e4602 (diff)
downloadgit-d53fe8187c38a5a160ef2199a899d9c47ec881b9.tar.gz
archive: add baselen member to struct archiver_args
Calculate the length of base and save it in a new member of struct archiver_args. This way we don't have to compute it in each of the format backends. Note: parse_archive_args() guarantees that ->base won't ever be NULL. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-archive.c')
-rw-r--r--builtin-archive.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-archive.c b/builtin-archive.c
index 6ee36775e7..e7f4ec6341 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -192,6 +192,7 @@ int parse_archive_args(int argc, const char **argv, const struct archiver **ar,
}
args->verbose = verbose;
args->base = base;
+ args->baselen = strlen(base);
return i;
}