From: Junio C Hamano Date: Wed, 6 Sep 2017 04:11:25 +0000 (+0900) Subject: Merge branch 'po/read-graft-line' X-Git-Tag: v2.15.0-rc0~111 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b36f0b196225fc25588220acf921d011d4bf9a7;p=thirdparty%2Fgit.git Merge branch 'po/read-graft-line' Conversion from uchar[20] to struct object_id continues; this is to ensure that we do not assume sizeof(struct object_id) is the same as the length of SHA-1 hash (or length of longest hash we support). * po/read-graft-line: commit: rewrite read_graft_line commit: allocate array using object_id size commit: replace the raw buffer with strbuf in read_graft_line sha1_file: fix definition of null_sha1 --- 8b36f0b196225fc25588220acf921d011d4bf9a7 diff --cc sha1_file.c index f56bb5cae7,f5b5bec52f..5f71bbac3e --- a/sha1_file.c +++ b/sha1_file.c @@@ -28,9 -28,11 +28,9 @@@ #include "list.h" #include "mergesort.h" #include "quote.h" - -#define SZ_FMT PRIuMAX -static inline uintmax_t sz_fmt(size_t s) { return s; } +#include "packfile.h" - const unsigned char null_sha1[20]; + const unsigned char null_sha1[GIT_MAX_RAWSZ]; const struct object_id null_oid; const struct object_id empty_tree_oid = { EMPTY_TREE_SHA1_BIN_LITERAL