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

Re: RCS keyword expansion

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 12, 2007, 17:44 UTC
Message-ID
<alpine.LFD.0.999.0710121041220.6887@woody.linux-foundation.org>
In-Reply-To
<m3y7e8jmbm.fsf@barry_fishman.acm.org>
On Fri, 12 Oct 2007, Barry Fishman wrote:
Show 8 quoted lines
> 
> I changed my editor (Emacs) to convert RCS Ids to timestamps when I
> opened a file for reading.  This would fix old files.  When i wrote out
> files I would update the timestamp before writing them (via emacs's
> timestamp package).  I didn't have to think about it as my RCS Id
> stamped files slowly evolve into my editor stamped ones.  I'm sure I
> could do something similar in VIM, or with a script encapsulating
> another editor.

I think it might also be potentially interesting to make this just be a pre-commit hook - although your point that doing it in the editor is to some degree even nicer, because it also means that it shows up in diffs even *before* you commit.

But if you want to explore the pre-commit hook approach, what it would basically boild down to is that at that point you have a list of all files that have changed, and then you could run some script on them to change them even further.

I'm sure you'd find some problems with the approach, and I think it absolutely sucks for merging (ie trivially you'll have all the merge problems people *always* have with RCS Id's, and now you need to teach the auto-merger to hide them from you), but it's probably better than trying to do it at some "core level" (which screws up things like switching branches etc).

			Linus
Previous: Barry FishmanNext: Florian Weimer
Message 24 of 27 in “RCS keyword expansion”
  1. Peter KarlssonOct 11, 2007
  2. Johannes SixtOct 11, 2007
  3. Randal L. SchwartzOct 11, 2007
  4. Oliver KullmannOct 11, 2007
  5. Alex RiesenOct 11, 2007
  6. Johannes SchindelinOct 11, 2007
  7. Sam VilainOct 11, 2007
  8. Peter KarlssonOct 12, 2007
  9. Johannes SchindelinOct 12, 2007
  10. Peter KarlssonOct 12, 2007
  11. Johannes SixtOct 12, 2007
  12. Lars HjemliOct 12, 2007
  13. Johannes SchindelinOct 12, 2007
  14. Peter KarlssonOct 15, 2007
  15. Johannes SchindelinOct 15, 2007
  16. Jan HudecOct 12, 2007
  17. Salikh ZakirovOct 12, 2007
  18. Johannes SchindelinOct 12, 2007
  19. Zakirov SalikhOct 12, 2007
  20. Peter KarlssonOct 11, 2007
  21. Alex RiesenOct 11, 2007
  22. Peter KarlssonOct 12, 2007
  23. Barry FishmanOct 12, 2007
  24. Linus TorvaldsOct 12, 2007
  25. Florian WeimerOct 12, 2007
  26. Sam VilainOct 11, 2007
  27. Lars HjemliOct 11, 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.