summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f4d051)
raw | patch | inline | side by side (parent: 7f4d051)
author | Rene Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Fri, 25 Jul 2008 10:41:24 +0000 (12:41 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 26 Jul 2008 00:21:04 +0000 (17:21 -0700) |
Move the declaration of struct archiver to archive.c, as this is the only
file left where it is used.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
file left where it is used.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive.c | patch | blob | history | |
archive.h | patch | blob | history |
diff --git a/archive.c b/archive.c
index c4662a28309ec71d82c9303bcb2c79ff53e9cf36..f834b5f51f4cf5d3b73d21dfd99198caef3b19f8 100644 (file)
--- a/archive.c
+++ b/archive.c
#define USES_ZLIB_COMPRESSION 1
-const struct archiver archivers[] = {
+const struct archiver {
+ const char *name;
+ write_archive_fn_t write_archive;
+ unsigned int flags;
+} archivers[] = {
{ "tar", write_tar_archive },
{ "zip", write_zip_archive, USES_ZLIB_COMPRESSION },
};
diff --git a/archive.h b/archive.h
index 929368d80b2d73fa926da532fe526be85f5a4c47..0b15b35143fffcc13764e4e668ee452b191cc609 100644 (file)
--- a/archive.h
+++ b/archive.h
typedef int (*write_archive_entry_fn_t)(struct archiver_args *args, const unsigned char *sha1, const char *path, size_t pathlen, unsigned int mode, void *buffer, unsigned long size);
-struct archiver {
- const char *name;
- write_archive_fn_t write_archive;
- unsigned int flags;
-};
-
/*
* Archive-format specific backends.
*/