git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git help for kernel archeology, suppress diffs caused by CVS keyword expansion
@ 2007-07-22 18:48 Jon Smirl
  2007-07-22 19:00 ` Johannes Schindelin
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Jon Smirl @ 2007-07-22 18:48 UTC (permalink / raw)
  To: Git Mailing List, lkml

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. 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?

Example diff caused by $Log expansion:

diff --git a/arch/cris/kernel/ptrace.c b/arch/cris/kernel/ptrace.c
index b3d10fb..32e47ca 100644
--- a/arch/cris/kernel/ptrace.c
+++ b/arch/cris/kernel/ptrace.c
@@ -8,6 +8,9 @@
  * Authors:   Bjorn Wesen
  *
  * $Log: ptrace.c,v $
+ * Revision 1.2  2003/06/26 21:08:16  vangool
+ * Commit kernel changes.
+ *
  * Revision 1.8  2001/11/12 18:26:21  pkj
  * Fixed compiler warnings.
  *

Or in this case the person edited out all of the lines in the kernel
containing $Id

diff --git a/arch/i386/boot/tools/build.c b/arch/i386/boot/tools/build.c
index 2edd0a4..792aeb1 100644
--- a/arch/i386/boot/tools/build.c
+++ b/arch/i386/boot/tools/build.c
@@ -1,5 +1,4 @@
 /*
- *  $Id: build.c,v 1.5 1997/05/19 12:29:58 mj Exp $
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 1997 Martin Mares

A variation on this where the Id was updated..
- *  $Id: build.c,v 1.5 1997/05/19 12:29:58 mj Exp $
+ *  $Id: build.c,v 1.5 2002/09/29 12:29:58 mj Exp $

There are a more CVS keywords that can cause expansion, probably around twenty.
When removing these with a simple grep it can get fooled and mess up.
CVS keyword expansion adds about 60,000 lines of noise to a typical
diff.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2007-07-24 13:08 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22 18:48 Git help for kernel archeology, suppress diffs caused by CVS keyword expansion Jon Smirl
2007-07-22 19:00 ` Johannes Schindelin
2007-07-22 19:10   ` Jon Smirl
2007-07-22 19:15     ` Johannes Schindelin
2007-07-22 19:48       ` Jon Smirl
2007-07-22 21:39         ` Johannes Schindelin
2007-07-22 23:45           ` Jon Smirl
2007-07-22 23:50             ` Johannes Schindelin
2007-07-23  0:11               ` Jon Smirl
2007-07-23  0:37                 ` Johannes Schindelin
2007-07-23 14:44                   ` Jon Smirl
2007-07-23 15:11                     ` Simon 'corecode' Schubert
2007-07-23 20:11                     ` Johannes Schindelin
2007-07-24  0:43                       ` Jon Smirl
2007-07-24  1:06                         ` Jon Smirl
2007-07-24  1:16                         ` Johannes Schindelin
2007-07-24 10:16                           ` Jakub Narebski
2007-07-24 11:26                             ` Johannes Schindelin
2007-07-24 13:08                               ` Jon Smirl
2007-07-22 19:09 ` Linus Torvalds
2007-07-22 19:12   ` Jon Smirl
2007-07-22 19:37     ` Linus Torvalds
2007-07-22 19:17   ` David Kastrup
2007-07-22 19:47 ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).