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

Re: git with custom diff for commits

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Dec 18, 2007, 23:52 UTC
Message-ID
<46a038f90712181552i46ecb1aof55c7cdfe0f5c079@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0712182246230.23902@racer.site>

On Dec 19, 2007 11:48 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> Yes.  Changes, as in "take this _file_ instead".  Not "edit this file,
> remove those lines, add these here, etc.".

Exactly. GIT is a "content tracker" that doesn't care about any semantic meaning in your files. Here's the file, git will store it, as is. No conversions, not fancy interpretations. Strict, safe and fast. (There's a small exception there for DOS-style newlines, which was much resisted.)

You can add external machinery that is aware of your content semantics -- as you've done with calling GNU diff with ignore patterns to decide whether to commit or not. But when you tell GIT to commit something, there's no guessing or transformation involved.

A lot of what GIT achieves is based on that founding principle. Remove it, and we're toast. For starters, the internal machinery is based on SHA1 digests that change if you flip a single byte. That's what makes git fast and realiable. It's not merely an end-user thing.

cheers,
m
Previous: Johannes SchindelinNext: Matthieu Moy
Message 18 of 24 in “git with custom diff for commits”
  1. Gerald GutierrezDec 17, 2007
  2. Johannes SchindelinDec 17, 2007
  3. Matthieu MoyDec 17, 2007
  4. Johannes SchindelinDec 17, 2007
  5. Junio C HamanoDec 17, 2007
  6. Matthieu MoyDec 18, 2007
  7. Junio C HamanoDec 18, 2007
  8. Gerald GutierrezDec 18, 2007
  9. Junio C HamanoDec 18, 2007
  10. Gerald GutierrezDec 18, 2007
  11. Johannes SchindelinDec 18, 2007
  12. Gerald GutierrezDec 18, 2007
  13. Johannes SchindelinDec 18, 2007
  14. Junio C HamanoDec 18, 2007
  15. Matthieu MoyDec 18, 2007
  16. Gerald GutierrezDec 18, 2007
  17. Johannes SchindelinDec 18, 2007
  18. Martin LanghoffDec 18, 2007
  19. Matthieu MoyDec 19, 2007
  20. Johannes SchindelinDec 19, 2007
  21. Matthieu MoyDec 19, 2007
  22. Matthieu MoyDec 19, 2007
  23. Gerald GutierrezDec 18, 2007
  24. Gerald GutierrezDec 17, 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.