]> git.ipfire.org Git - thirdparty/git.git/commit - notes.c
notes: convert internal parts to struct object_id
authorbrian m. carlson <sandals@crustytoothpaste.net>
Tue, 30 May 2017 17:30:38 +0000 (10:30 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Jun 2017 00:36:06 +0000 (09:36 +0900)
commit89c149f55b93e052e46e46ebc4d7e76b0b25a90c
tree61d05476172a750b8bce7cb4bdfd57cb4ffc247f
parent5dcc969e79ebb1e9c1996ffd972bb76467d3bc84
notes: convert internal parts to struct object_id

Convert several portions of the internals of the code to struct
object_id.  Introduce two macros to denote the different constants in
the code: KEY_INDEX for the last byte of the object ID, and
FANOUT_PATH_SEPARATORS for the number of possible path separators (on
Unix, "/").  While these constants are both 19 (one less than the number
of bytes in the hash), distinguish them to make the code more
understandable, and define them logically based on their intended
purpose.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
notes.c