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

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
Previous: Johannes SchindelinNext: Junio C Hamano
Message 3 of 5 in “Change git-cvsimport to handle slashes in CVS tags”
  1. Change git-cvsimport to handle slashes in CVS tagsWayne Scott, Oct 28, 2005
  2. Johannes SchindelinOct 28, 2005
  3. Linus TorvaldsOct 28, 2005
  4. Junio C HamanoOct 28, 2005
  5. H. Peter AnvinOct 28, 2005

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.