Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
zip: use GIT_SHA1_HEXSZ for trailers
author
brian m. carlson
<sandals@crustytoothpaste.net>
Fri, 13 Mar 2015 23:39:31 +0000
(23:39 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 14 Mar 2015 05:43:12 +0000
(22:43 -0700)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-zip.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
1360967
)
diff --git
a/archive-zip.c
b/archive-zip.c
index 4bde019bce632703d4e336d6404693487cdbcdfb..b669e506ee45e653bd3bb858e8b8742a237b475b 100644
(file)
--- a/
archive-zip.c
+++ b/
archive-zip.c
@@
-427,12
+427,12
@@
static void write_zip_trailer(const unsigned char *sha1)
copy_le16(trailer.entries, zip_dir_entries);
copy_le32(trailer.size, zip_dir_offset);
copy_le32(trailer.offset, zip_offset);
copy_le16(trailer.entries, zip_dir_entries);
copy_le32(trailer.size, zip_dir_offset);
copy_le32(trailer.offset, zip_offset);
- copy_le16(trailer.comment_length, sha1 ?
40
: 0);
+ copy_le16(trailer.comment_length, sha1 ?
GIT_SHA1_HEXSZ
: 0);
write_or_die(1, zip_dir, zip_dir_offset);
write_or_die(1, &trailer, ZIP_DIR_TRAILER_SIZE);
if (sha1)
write_or_die(1, zip_dir, zip_dir_offset);
write_or_die(1, &trailer, ZIP_DIR_TRAILER_SIZE);
if (sha1)
- write_or_die(1, sha1_to_hex(sha1),
40
);
+ write_or_die(1, sha1_to_hex(sha1),
GIT_SHA1_HEXSZ
);
}
static void dos_time(time_t *time, int *dos_date, int *dos_time)
}
static void dos_time(time_t *time, int *dos_date, int *dos_time)