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
JEJan Engelhardt <jengelh@computergmbh.de>
Date
Jul 22, 2007, 19:47 UTC
Message-ID
<Pine.LNX.4.64.0707222139400.15705@fbirervta.pbzchgretzou.qr>
In-Reply-To
<9e4733910707221148g69d7600bk632abb7452ce9c7c@mail.gmail.com>
On Jul 22 2007 14:48, Jon Smirl wrote:
Show 11 quoted lines
>
> It would really be useful if git diff had an option for suppressing
> diffs caused by CVS keyword expansion. I run into this problem over
> and over when trying to recover stuff out of old kernel sources that
> people checked into CVS and then posted CVS diffs to fulfill their GPL
> obligations. I sometimes wonder if vendors are doing this on purpose
> to make it more difficult to recover the changes they made to the
> code.
>
> To prevent this in the future, I'd love to see a patch removing all
> CVS keywords from the kernel sources.

I say: yes please. Even svn (which Linus dislikes very much) has cvs keywords disabled by default. And at the same time, a patch to CodingStyle not to include CVS tags, and a patch to checkpatch.pl to enforce it :)

> Quick grep of kernel shows 1,535 $Id, 197 $Log, 441 $Revision, 144 $Date. I
> guestimate that this would remove about 5,000 lines form the kernel source
> and touch 1,700 files. Would this be accept or do those expansions contain
> useful info?

Common argument for $Id$ tags has been, that upon a problem, a user can look into dmesg (or whatever log is appropraite - it's not limited to the kernel) for the version string instead of figuring it out himself (by means or rpm -q, or whatever hides it).

For the Linux kernel however, I do not think it is important, since:
- the code of a module changes faster than you can think (e.g.
  a change in the network code touched a network filesystem). Result:
  same $Id$ tag in the vendor's version AND the mainline version.
  So the tag is useless.
- you know what version you are running, mingetty usually prints it
  for you; uname -a also shows it.
- if you have a problem, people kindly ask you to bisect anyway, in
  which case $Id$ numbers become irrelevant anyway, because you got
  the git SHA1 ids.

Yep, that's pretty much it from my side. Conclusion: Remove CVS tags from kernel.

	Jan
Previous: David Kastrup
Message 24 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.