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
Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Date
Jul 23, 2007, 15:11 UTC
Message-ID
<46A4C51D.2060202@fs.ei.tum.de>
In-Reply-To
<9e4733910707230744u2d3a0a31t9f65d5c9e68c9805@mail.gmail.com>
Jon Smirl wrote:
Show 32 quoted lines
> On 7/22/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> 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
Previous: Jon SmirlNext: Johannes Schindelin
Message 12 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.