Re: [RFC PATCH 08/10] pack-objects: introduce '--stdin-packs=follow-reachable'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 27, 2026, 02:09 UTC
- Message-ID
- <xmqq8q8068f7.fsf@gitster.g>
- In-Reply-To
- <aj8cOhH6hGVZIFft@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 9 quoted lines
>> > + if (packed_object_info(p, ofs, &oi) < 0) >> > + return 0; >> > + if (type != OBJ_COMMIT && type != OBJ_TAG) >> > + return 0; >> >> We do not care about non commits, non tags. > > This should not be an &&, but rather an ||. We only want to handle > objects which are either commits *or* tags via this function.
My comment above did not mean to say anything is wrong in the code; I was just thinking aloud. We return for blob or tree because they are not commit and they are not tag. If we say "||" then we return for everybody, because anything that is a commit (failing the LHS of the "||") cannot be a tag (satisfying the RHS of the "||").