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

Re: Git help for kernel archeology, suppress diffs caused by CVS keyword expansion

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jul 22, 2007, 19:37 UTC
Message-ID
<alpine.LFD.0.999.0707221234250.3607@woody.linux-foundation.org>
In-Reply-To
<9e4733910707221212v2f6cc1c4kf7a35e84f351e4cd@mail.gmail.com>
On Sun, 22 Jul 2007, Jon Smirl wrote:
Show 24 quoted lines
> On 7/22/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > 
> > 
> > On Sun, 22 Jul 2007, Jon Smirl wrote:
> > >
> > > It would really be useful if git diff had an option for suppressing
> > > diffs caused by CVS keyword expansion.
> > 
> > I really think it's not a "git diff" issue, but it might be a "import"
> > issue.
> > 
> > IOW, I think you'd be a *lot* better off just not importing those things
> > in the first place (which is what CVS does internally), or possibly
> > importing them as two trees (ie you'd have the "non-log" version and the
> > "log expansion" version, so that you can track and compare both).
> > 
> > Doing the thing at "diff" time is certainly possible, but this is simply
> > much better done as a totally independent preprocessing phase. The diff
> > handling is already some of the more complex parts (and very central), it
> > would be much simpler and efficient to not try to make that thing fancier,
> > and instead solve the problem at the front-end.
> 
> These diffs are coming from companies doing GPL compliance without
> really wanting to comply. CVS servers are not made available.
That wasn't what I said. 
You want to supporess the CVS keyword expansion.
I'm telling you that you should just do so.
But I'm *also* telling you that this has nothing to do with "git diff".

The way to get "git diff" to not show the CVS expansion is to *remove* the CVS expansion. By simply running some pre-processing on the patches *before* you put them into git in the first place (or, like Dscho suggested: you could do it later too, by using git filter-branch).

Once you have the version that doesn't have the CVS log, "git diff" will automatically do the rigth thing.

In other words, I'm just saying that you're trying to solve the wrong problem. Once you solve the *right* problem, the wrong problem just goes away.

			Linus
Previous: Jon SmirlNext: David Kastrup
Message 22 of 24 in “Git help for kernel archeology, suppress diffs caused by CVS keyword expansion”
  1. Jon SmirlJul 22, 2007
  2. Johannes SchindelinJul 22, 2007
  3. Jon SmirlJul 22, 2007
  4. Johannes SchindelinJul 22, 2007
  5. Jon SmirlJul 22, 2007
  6. Johannes SchindelinJul 22, 2007
  7. Jon SmirlJul 22, 2007
  8. Johannes SchindelinJul 22, 2007
  9. Jon SmirlJul 23, 2007
  10. Johannes SchindelinJul 23, 2007
  11. Jon SmirlJul 23, 2007
  12. Simon 'corecode' SchubertJul 23, 2007
  13. Johannes SchindelinJul 23, 2007
  14. Jon SmirlJul 24, 2007
  15. Jon SmirlJul 24, 2007
  16. Johannes SchindelinJul 24, 2007
  17. Jakub NarebskiJul 24, 2007
  18. Johannes SchindelinJul 24, 2007
  19. Jon SmirlJul 24, 2007
  20. Linus TorvaldsJul 22, 2007
  21. Jon SmirlJul 22, 2007
  22. Linus TorvaldsJul 22, 2007
  23. David KastrupJul 22, 2007
  24. Jan EngelhardtJul 22, 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.