Re: [PATCHv3 3/7] show: honor --textconv for blobs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 11, 2013, 17:36 UTC
- Message-ID
- <7vr4hdxvtl.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <518E0741.1060008@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 14 quoted lines
>>> + if (!DIFF_OPT_TOUCHED(&rev->diffopt, ALLOW_TEXTCONV) || >>> + !DIFF_OPT_TST(&rev->diffopt, ALLOW_TEXTCONV)) >>> + return stream_blob_to_fd(1, sha1, NULL, 0); >> >> It is surprising that the necessary change is only this, but I think >> it is correct ;-). We ignore textconv when the command line did not >> mention --[no-]textconv, or the command line said --no-textconv >> explicitly. >> >> This (especially the first condition) may deserve an in-code comment >> for anybody who wonders where this default behaviour is implemented. > > It's not as if we would document behavior by in-code comments in > general, do we? The usual answer is "git log -S" or "git blame".
The comment and the future reader I had in mind was more like
Default to --no-textconv, even though cmd_log_init_defaults()
sets the bit, when the user did not explicitly ask for it.sought by somebody who wonders _where_ in the code we ignore ALLOW_TEXTCONV that is set in cmd_log_init_defaults().
That is not something you can find with "log -S" or "blame", is it?