Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
object-file: inline empty tree and blob literals
We define macros with the bytes of the empty trees and blobs for sha1 and sha256. But since e1ccd7e (sha1_file: only expose empty object constants through git_hash_algo, 2018-05-02), those are used only for initializing the git_hash_algo entries. Any other code using the macros directly would be suspicious, since a hash_algo pointer is the level of indirection we use to make everything work with both sha1 and sha256. So let's future proof against code doing the wrong thing by dropping the macros entirely and just initializing the structs directly. Signed-off-by: Jeff King <[email protected]>
- Loading branch information