From: Glen Choo Date: Mon, 24 Apr 2023 18:51:54 GMT Subject: Re: [PATCH v2 13/22] hash-ll.h: split out of hash.h to remove dependency on repository.h Message-ID: In-Reply-To: "Elijah Newren via GitGitGadget" writes: > Move the parts of hash.h that do not > depend upon repository.h into a new file hash-ll.h (the "low level" > parts of hash.h), and adjust other files to use this new header where > the convenience inline functions aren't needed. Suggestion: To maintain this property, it might be helpful to capture the rules of hash-ll.h vs hash.h in a top-level comment. > diff --git a/hash-ll.h b/hash-ll.h > new file mode 100644 > index 00000000000..80509251370 > --- /dev/null > +++ b/hash-ll.h > +const struct object_id *null_oid(void); > [...] > +const char *empty_tree_oid_hex(void); > +const char *empty_blob_oid_hex(void); hash-ll.h doesn't depend on repository.h, but these functions' bodies use the_hash_algo. Does it matter? Moving the functions to hash.h requires changing 8 files to #include "hash.h", all of which seem to be because they were getting hash-ll.h indirectly via object-name.h.