Re: [PATCHv3 3/7] show: honor --textconv for blobs
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- May 11, 2013, 10:00 UTC
- Message-ID
- <518E16B1.7000505@drmicha.warpmail.net>
- In-Reply-To
- <518E0741.1060008@drmicha.warpmail.net>
Adding to that:
Somehow I still feel I should introduce a new attribute "show" (or a better name) similar to "diff" so that you can specifiy a diff driver to use for showing a blob (or grepping it), which may or may not be the same you use for "diff". This would be a much more fine-grained and systematic way of setting a default for "--textconv" for blobs.
Of course, some driver attributes would just not matter for coverting blobs, but that doesn't hurt.
I'm just wondering whether it's worth the effort and whether I should distinguish between "show" and grep".
So, the sructure would be:
"--textconv" is on by default for diff, show, grep.
diff looks for a textconv driver using the "diff" attribute. show/grep look for a textconv driver using the "show" attribute.
That way, turning on "--textconv" by default does not affect anyone unless a user specifies the new attribute!
Also, all commands would behave "the same way" if you have both a diff and a show attribute set on the same files..
Michael