Thread (23 messages) flat view 23 messages, 6 authors, 2016-06-15

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

From: Simon 'corecode' Schubert <hidden>
Date: 2016-06-15 22:43:23

Jon Smirl wrote:
quoted hunk ↗ jump to hunk
On 7/22/07, Johannes Schindelin [off-list ref] wrote:
quoted
Okay, I did not really test thoroughly, it seems.  Sorry.  Next try.
It's working a lot better. People deal with $Id two different ways.
One way they delete all of the $Id lines, that is the case of the
Sonos patch. In the Phytec patch they left all of the $Id lines in
place which caused them to get modified. In both cases you just want
the lines with $Id to disappear in the patch.

It doesn't catch the $Id case from the Phytec patch.

diff -uarN linux-2.6.10/arch/cris/arch-v10/boot/rescue/head.S
linux-2.6.10-lpc3180/arch/cris/arch-v10/boot/rescue/head.S
--- linux-2.6.10/arch/cris/arch-v10/boot/rescue/head.S  2004-12-25
05:35:24.000000000 +0800
+++ linux-2.6.10-lpc3180/arch/cris/arch-v10/boot/rescue/head.S
2006-11-20 15:49:30.000000000 +0800
@@ -1,4 +1,5 @@
/* $Id: head.S,v 1.6 2003/04/09 08:12:43 pkj Exp $
+/* $Id: head.S,v 1.2 2005/02/18 13:06:31 mike Exp $
 *
 * Rescue code, made to reside at the beginning of the
 * flash-memory. when it starts, it checks a partition

It's not catching all of the $Revision and $Date deltas.

The output diff shouldn't contain any CVS keywords. It is somewhat
tricky to catch all of the cases and fix up the diffs. This filter
should get written and debugged once and then made part of something
like git so that it doesn't get written over and over again. Perl is
way better for this I had 1000 lines of C in my program and it was
still missing 10% of the cases.
Maybe I am missing something, but apart from $Log$, what's so hard about collapsing the CVS keywords?  That's something like

s/\$(Id|Date|Header|CVSHeader|Author|Revision):[^$]*\$/$\1$/

or not?

I see that people want to modify the patch text to remove the churn, but that seems wrong.  It would be much easier to just collapse the keywords before applying the patch, and then work on a newly created diff (from the git repo).

cheers
  simon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help