]> git.ipfire.org Git - thirdparty/git.git/commit - hash.h
hash.h: move object_id definition from cache.h
authorJeff King <peff@peff.net>
Thu, 20 Jun 2019 07:41:45 +0000 (03:41 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jun 2019 17:40:42 +0000 (10:40 -0700)
commitc0566d78aac1d5f8ff90c75f2d936487bb5a8d84
treed29ea8932124b74d0faab9913d266dbc2777a82c
parente465e7c41d5104b48a16b122a666cbbfa184c25d
hash.h: move object_id definition from cache.h

Our hashmap.h helpfully defines a sha1hash() function. But it cannot
define a similar oidhash() without including all of cache.h, which
itself wants to include hashmap.h! Let's break this circular dependency
by moving the definition to hash.h, along with the remaining RAWSZ
macros, etc. That will put them with the existing git_hash_algo
definition.

One alternative would be to move oidhash() into cache.h, but it's
already quite bloated. We're better off moving things out than in.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
hash.h