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

Re: Weird shallow-tree conversion state, and branches of shallow trees

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Apr 15, 2007, 20:51 UTC
Message-ID
<Pine.LNX.4.64.0704151317180.5473@woody.linux-foundation.org>
In-Reply-To
<200704152051.35639.andyparkins@gmail.com>
On Sun, 15 Apr 2007, Andy Parkins wrote:
> 
> You're right that it can cause problems, but it is certainly not the 
> case that there are no valid uses for it.
I'm sorry, but you're just wrong.
There are no valid uses for it in the working tree. Full stop.

There are valid uses to tag sources with some revision information WHEN IT LEAVES THE REVISION CONTROLLED ENVIRONMENT, but not one second before that.

Show 9 quoted lines
> I keep diagrams for a project in SVG format in the repository, this 
> works very well because SVG is so nicely ASCII.  In the title block of 
> the diagram I put "$Id$", then in subversion, after checking in and 
> updating it got expanded to
> 
>  $Id: diagram.svg 148 2002-07-28 21:30:43Z andyp $
> 
> Now, I print out that diagram and pin it to my wall - sometimes copies 
> of it are given to others.  I do this on a regular basis.

And is there *any* reason why you don't just do that as an "export" option, when it's very clear that people won't send diffs that include it and that will cause all the endless problems that keyword expansion causes?

Why would you ever have the pain and suffering of using it within the source control issue? Especially since you would be a *lot* better off using just an export script that can do a lot better than CVS/SVN keyword expansion could ever do (ie you can add all sorts of more relevant information than just a date and user name!)

> Please explain to me why that is not a valid use.

It's not a valid use because there are many SO MUCH BETTER WAYS to get the same thing, that have none of the downsides of keyword expansion?

Your argument is akin to saying that "Why isn't it a valid use to replace the steering wheel in my car with a mouth-operated joystick under the passenger side seat?"

Sure, you *can* steer a car by mouthing at it while having your head under the passenger side seat, and your butt sticking out through the moonroof ("We could add a periscope so that I can see where I'm going!")

But that's not an argument *for* doing it, when there are ways that are obviously much better, and don't _need_ the periscope!

See?

The fact that you *can* do something is not a valid argument for it being a valid use. You *can* do stupid things, but if you can get to the same end result by not doing stupid things, wouldn't you prefer that instead?

Here's a small makefile snippet for you:
	%.prt: %.svg
		sed 's/\$$Id\$$/\$$ $(shell git log --pretty=format:"%h: %s (%an)" --abbrev-commit -1 file.svg) \$$/g' < $< > $@

which would need some work (it doesn't quote things right - in reality you'd write a simple script to do this properly).

See? No need for a periscope, and your butt can be toasty warm too if you just add a seat heater option...

		Linus
Previous: Andy ParkinsNext: Bill Lear
Message 11 of 34 in “Weird shallow-tree conversion state, and branches of shallow trees”
  1. Robin H. JohnsonApr 12, 2007
  2. Johannes SchindelinApr 14, 2007
  3. Robin H. JohnsonApr 15, 2007
  4. David LangApr 15, 2007
  5. Robin H. JohnsonApr 15, 2007
  6. Shawn O. PearceApr 15, 2007
  7. Nguyen Thai Ngoc DuyApr 15, 2007
  8. Jakub NarebskiApr 15, 2007
  9. Linus TorvaldsApr 15, 2007
  10. Andy ParkinsApr 15, 2007
  11. Linus TorvaldsApr 15, 2007
  12. Bill LearApr 16, 2007
  13. Andy ParkinsApr 16, 2007
  14. Julian PhillipsApr 16, 2007
  15. Robin H. JohnsonApr 16, 2007
  16. Theodore TsoApr 16, 2007
  17. Nguyen Thai Ngoc DuyApr 16, 2007
  18. Linus TorvaldsApr 16, 2007
  19. Nguyen Thai Ngoc DuyApr 16, 2007
  20. Robin H. JohnsonApr 16, 2007
  21. Linus TorvaldsApr 16, 2007
  22. Daniel BarkalowApr 17, 2007
  23. Linus TorvaldsApr 16, 2007
  24. Andy ParkinsApr 16, 2007
  25. Sven VerdoolaegeApr 16, 2007
  26. Linus TorvaldsApr 16, 2007
  27. David LangApr 16, 2007
  28. David LangApr 17, 2007
  29. Andy ParkinsApr 17, 2007
  30. Junio C HamanoApr 16, 2007
  31. Andy ParkinsApr 16, 2007
  32. Junio C HamanoApr 17, 2007
  33. Andy ParkinsApr 17, 2007
  34. Robin H. JohnsonApr 15, 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.