author | Jeff King <peff@peff.net> | |
Wed, 22 Jun 2011 01:23:33 +0000 (21:23 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 22 Jun 2011 18:12:35 +0000 (11:12 -0700) | ||
commit | 13e0f88d4aba326da9217c225d6ab5e642eb611d | |
tree | af7e13e62c420620946b152ea383f680d6105a94 | tree | snapshot |
parent | 40e7629194c79e72009b5b8e98cce65921b0faf2 | commit | diff |
archive: refactor list of archive formats
Most of the tar and zip code was nicely split out into two
abstracted files which knew only about their specific
formats. The entry point to this code was a single "write
archive" function.
However, as these basic formats grow more complex (e.g., by
handling multiple file extensions and format names), a
static list of the entry point functions won't be enough.
Instead, let's provide a way for the tar and zip code to
tell the main archive code what they support by registering
archiver names and functions.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Most of the tar and zip code was nicely split out into two
abstracted files which knew only about their specific
formats. The entry point to this code was a single "write
archive" function.
However, as these basic formats grow more complex (e.g., by
handling multiple file extensions and format names), a
static list of the entry point functions won't be enough.
Instead, let's provide a way for the tar and zip code to
tell the main archive code what they support by registering
archiver names and functions.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-tar.c | diff | blob | history | |
archive-zip.c | diff | blob | history | |
archive.c | diff | blob | history | |
archive.h | diff | blob | history |