Re: [PATCH 1/2] grep: let grep_buffer callers specify a binary flag
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 2, 2012, 00:47 UTC
- Message-ID
- <7vhaza12ol.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120201232109.GA2652@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> The caller of grep_buffer may have extra information about > whether a buffer is binary or not (e.g., from configuration). > Let's give them a chance to pass along that information and > override our binary auto-detection.
Hrm, I would have expected a patch that turns "const char *name" into a structure that has name and drv as its members, so that later we can tell the function more about the nature of the contents. Or a separate pointer to drv in place of your "binary" flag word.
I am not saying that your patch is wrong. It was just somewhat unexpected that "binary" is the only additional thing we want to tell the function.