Re: [PATCH] Change git-cvsimport to handle slashes in CVS tags
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Oct 28, 2005, 19:10 UTC
- Message-ID
- <Pine.LNX.4.64.0510281151450.4664@g5.osdl.org>
- In-Reply-To
- <59a6e5830510281146s7b25da76l8bf97287522b89f2@mail.gmail.com>
Hmm.. git can certainly handle slashes in tags, but you'd need to basically "mkdir" the path up to there before creating them.
That's probably not the right thing to do for a tag that comes from the outside, since in git, the slashes work like in a filesystem, and should imply grouping (ie you might have a family of tags that is named by usage, and be called something like "release/xyz" or whatever).
Is "_" the right thing to replace it with, though? To me, "_" replaces either a space or a dash, while a slash could be replaced by something more like a special character.
Maybe it's just me, but your example "dev-stubs-merge-8-1-3/9/99" might look nicer either of these ways:
- dev-stubs-merge-8-1-3|9|99 (but "|" is hard to use with shell) - dev-stubs-merge-8-1-3.9.99 (CVS tags can't contain '.', right?) - dev-stubs-merge-8-1-3:9:99 (confuse with time?) - dev-stubs-merge-8-1-3+9+99 (one arithmetic op replaced by another) - dev-stubs-merge-8-1-3#9#99 (that's pretty ugly) - dev-stubs-merge-8-1-3?9?99 (Wayne might be right after all) - dev-stubs-merge-8-1-3_9_99 (maybe Wayne _is_ right?)
I dunno. But maybe we do want the option of just keeping it as a slash, and teach git-cvsimport to create the proper subdirectory prefixes.
I have no idea how to do that in perl, though. Right now it just does
open(C,">$git_dir/refs/tags/$xtag")
how would you do "create file with all path components"?
Linus