Skip to content

Commit f15f736

Browse files
Rene Scharfegitster
authored andcommitted
archive: declare struct archiver where it's needed
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>
1 parent 7f4d051 commit f15f736

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

archive.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ static const char archive_usage[] = \
99

1010
#define USES_ZLIB_COMPRESSION 1
1111

12-
const struct archiver archivers[] = {
12+
const struct archiver {
13+
const char *name;
14+
write_archive_fn_t write_archive;
15+
unsigned int flags;
16+
} archivers[] = {
1317
{ "tar", write_tar_archive },
1418
{ "zip", write_zip_archive, USES_ZLIB_COMPRESSION },
1519
};

archive.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ typedef int (*write_archive_fn_t)(struct archiver_args *);
1717

1818
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);
1919

20-
struct archiver {
21-
const char *name;
22-
write_archive_fn_t write_archive;
23-
unsigned int flags;
24-
};
25-
2620
/*
2721
* Archive-format specific backends.
2822
*/

0 commit comments

Comments
 (0)