diff options
author | Jeff King <peff@peff.net> | 2017-01-02 17:25:09 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-07 18:49:30 -0800 |
commit | 965cba2e7ee9b272a35d66a11f0a7bf544aa727a (patch) | |
tree | a04e9feb44586fee85bff420c7d370bf491cfdaf /archive-zip.c | |
parent | c3808ca6982b0ad7ee9b87eca9b50b9a24ec08b0 (diff) | |
download | git-965cba2e7ee9b272a35d66a11f0a7bf544aa727a.tar.gz |
archive-zip: load userdiff configjk/archive-zip-userdiff-config
Since 4aff646d17 (archive-zip: mark text files in archives,
2015-03-05), the zip archiver will look at the userdiff
driver to decide whether a file is text or binary. This
usually doesn't need to look any further than the attributes
themselves (e.g., "-diff", etc). But if the user defines a
custom driver like "diff=foo", we need to look at
"diff.foo.binary" in the config. Prior to this patch, we
didn't actually load it.
Signed-off-by: Jeff King <peff@peff.net>
Acked-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive-zip.c')
-rw-r--r-- | archive-zip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/archive-zip.c b/archive-zip.c index 9db47357b0..b429a8d974 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -554,11 +554,18 @@ static void dos_time(time_t *time, int *dos_date, int *dos_time) *dos_time = t->tm_sec / 2 + t->tm_min * 32 + t->tm_hour * 2048; } +static int archive_zip_config(const char *var, const char *value, void *data) +{ + return userdiff_config(var, value); +} + static int write_zip_archive(const struct archiver *ar, struct archiver_args *args) { int err; + git_config(archive_zip_config, NULL); + dos_time(&args->time, &zip_date, &zip_time); zip_dir = xmalloc(ZIP_DIRECTORY_MIN_SIZE); |