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

Re: [RFD] Strange patch formats (aka tricks with unified diffs)..

From
Junio C Hamano <junkio@cox.net>
Date
Apr 14, 2007, 09:55 UTC
Message-ID
<7vbqhrb7r2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0704141051350.18846@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 9 quoted lines
> On Thu, 12 Apr 2007, Junio C Hamano wrote:
>
>> [...] the --color-words (whose implementation I happen to hate) [...]
>
> I know that we talked about it previously. And strictly, I think it is not 
> the implementation that you hate, but the rules that were implemented.
>
> I'll have a look at what you wrote back then, and try to come up with some 
> sensible alternatives, so you don't have to hate the code so much.

One sensible behaviour would be to show exactly the same output lines as the regular output, but color-code only the words that changed. E.g (the words are capitalized to illustrate instead of colored here):

        diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt
        index 6a5fcfd..535214c 100644
        --- a/Documentation/git-cvsserver.txt
        +++ b/Documentation/git-cvsserver.txt
        @@ -125,7 +131,7 @@ By default it uses SQLite databases in the git directory, named
         temporary files in the same directory as the database file on
         write so it might not be enough to grant the users using
         git-cvsserver write access to the database file without granting
        -them ALSO write access to the directory.
        +them write access to the directory, TOO.
         You can configure the database backend with the following
         configuration variables:
Previous: Johannes SchindelinNext: Jeff King
Message 10 of 16 in “[RFD] Strange patch formats (aka tricks with unified diffs)..”
  1. Linus TorvaldsApr 12, 2007
  2. Junio C HamanoApr 12, 2007
  3. Marco CostalbaApr 13, 2007
  4. Marco CostalbaApr 17, 2007
  5. Paul MackerrasApr 13, 2007
  6. Martin LanghoffApr 13, 2007
  7. Junio C HamanoApr 13, 2007
  8. Martin LanghoffApr 13, 2007
  9. Johannes SchindelinApr 14, 2007
  10. Junio C HamanoApr 14, 2007
  11. Jeff KingApr 14, 2007
  12. Linus TorvaldsApr 13, 2007
  13. Paul MackerrasApr 18, 2007
  14. Linus TorvaldsApr 18, 2007
  15. Matthias LederhoferApr 13, 2007
  16. Linus TorvaldsApr 13, 2007

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.