Skip to content
  • Jeff King's avatar
    diff_filespec: use only 2 bits for is_binary flag · cbfe47b6
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The is_binary flag needs only three values: -1, 0, and 1.
    However, we use a whole 32-bit int for it on most systems
    (both 32- and 64- bit).
    
    Instead, we can mark it to use only 2 bits. On 32-bit
    systems, this lets it end up as part of the bitfield above
    (saving 4 bytes). On 64-bit systems, we don't see any change
    (because the savings end up as padding), but it does leave
    room for another "free" 32-bit value to be added later.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    cbfe47b6