]> git.ipfire.org Git - thirdparty/git.git/commit
hash-object: merge HASH_* and INDEX_* flags
authorJeff King <peff@peff.net>
Fri, 16 May 2025 04:50:08 +0000 (00:50 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 May 2025 16:43:11 +0000 (09:43 -0700)
commit931e5ca5079e1526045a55b60fc3134494387111
tree9533fe0dc8a7fb5e7d9b459883cf352746b3d279
parent65a6a79b4204a2038498fd14be993b89067a046a
hash-object: merge HASH_* and INDEX_* flags

The hash-object command has its own custom flag bits that it sets based
on command-line options. But since we dropped hash_literally() in the
previous commit, the only thing we do with those flag bits is convert
them directly into "index_flags" to pass to index_fd().

This extra layer of indirection makes the code harder to read and reason
about. Let's just use the INDEX_* flags directly.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/hash-object.c