Re: [PATCH 11/13] hash-object: merge HASH_* and INDEX_* flags
- From
Patrick Steinhardt <ps@pks.im>
- Date
- May 16, 2025, 09:52 UTC
- Message-ID
- <aCcK5iF3h2j4gQf7@pks.im>
- In-Reply-To
- <20250516045008.GK22242@coredump.intra.peff.net>
On Fri, May 16, 2025 at 12:50:08AM -0400, Jeff King wrote:
Show 7 quoted lines
> 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.
Heh, coming full circle with 70c0f9db4e0 (object-file: split up concerns of `HASH_*` flags, 2025-04-15). But I agree, now that we have dropped the `hash_literally()` function this is a sensible change.
Patrick