From: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 4/6] archive: declare struct archiver where it's needed
Date: Fri, 25 Jul 2008 12:41:24 +0200 [thread overview]
Message-ID: <1216982486-5887-4-git-send-email-rene.scharfe@lsrfire.ath.cx> (raw)
In-Reply-To: <1216982486-5887-3-git-send-email-rene.scharfe@lsrfire.ath.cx>
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>
---
archive.c | 6 +++++-
archive.h | 6 ------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/archive.c b/archive.c
index c4662a2..f834b5f 100644
--- a/archive.c
+++ b/archive.c
@@ -9,7 +9,11 @@ static const char archive_usage[] = \
#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 929368d..0b15b35 100644
--- a/archive.h
+++ b/archive.h
@@ -17,12 +17,6 @@ typedef int (*write_archive_fn_t)(struct archiver_args *);
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.
*/
--
1.6.0.rc0.42.g186458
next prev parent reply other threads:[~2008-07-25 10:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 10:41 [PATCH 1/6] archive: add write_archive() Rene Scharfe
2008-07-25 10:41 ` [PATCH 2/6] archive: move parameter parsing code to archive.c Rene Scharfe
2008-07-25 10:41 ` [PATCH 3/6] archive: define MAX_ARGS where it's needed Rene Scharfe
2008-07-25 10:41 ` Rene Scharfe [this message]
2008-07-25 10:41 ` [PATCH 5/6] archive: allow --exec and --remote without equal sign Rene Scharfe
2008-07-25 10:41 ` Rene Scharfe
2008-07-25 10:54 ` René Scharfe
2008-07-26 0:31 ` Junio C Hamano
2008-07-26 7:09 ` PATCH 6/6] archive: convert,to parse_options() [was: [PATCH 5/6] archive: allow --exec and --remote without equal sign] René Scharfe
2008-07-26 0:28 ` [PATCH 5/6] archive: allow --exec and --remote without equal sign Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1216982486-5887-4-git-send-email-rene.scharfe@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).