git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Teach --text option to diff

From
Ssf <sf@b-i-t.de>
Date
Jul 7, 2006, 11:53 UTC
Message-ID
<44AE4B35.6060607@b-i-t.de>
In-Reply-To
<7v64i91xow.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 11 quoted lines
> Stephan Feder <sf@b-i-t.de> writes:
> 
>> I have to send patches of binary data to a customer but the builtin diff
>> was no help in this case.
> 
> Given the previous patch, and also your point #2 below, I would
> have expected you to introduce an option to force files to be
> treated as binary even when they are otherwise misidentified as
> text, but this patch is going the other way.
> 
> Interesting.

Not really. I was surprised that the GNU diff option --text is unsupported in the builtin diff.

Show 6 quoted lines
> 
>> 1. The shorthand -a for --text is not implemented. Is there a conflicting
>> shorthand?
> 
> I do not think of one offhand, but it's the responsibility for
> the party to propose such an enhancement to do the study ;-)

Of course. I did not find any conflict but as the builtin diff and its options are used by quite a lot of git commands I wanted to make sure.

If no objections arise I am going to add the shorthand.
Show 7 quoted lines
>> 2. For diffstat --text is ignored. It seems pointless because binary
>> patch data is not for human consumption anyway.
> 
>> 3. No documentation yet. If the patch is accepted I will add a short
>> description. To Documentation/diff-options.txt?
> 
> Most likely that would be the place.
Good.
Previous: Junio C HamanoNext: Stephan Feder
Message 3 of 6 in “Teach --text option to diff”
  1. Teach --text option to diffStephan Feder, Jul 7, 2006
  2. Junio C HamanoJul 7, 2006
  3. sfJul 7, 2006
  4. 1/3 Teach diff -a as shorthand for --textStephan Feder, Jul 7, 2006
  5. 2/3 Add -a and --text to common diff options helpStephan Feder, Jul 7, 2006
  6. 3/3 diff-options: Explain --text and -aStephan Feder, Jul 7, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.