Re: [PATCH] Change git-cvsimport to handle slashes in CVS tags
- From
Junio C Hamano <junkio@cox.net>
- Date
- Oct 28, 2005, 20:29 UTC
- Message-ID
- <7vmzkt4c7s.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0510281151450.4664@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> 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.
How about doing both?
I think patch by Johannes to allow replacing slash to arbitrary string is a reasonable thing to have, but somebody who uses cvsimport needs to sign that off for me -- I do not regularly use git-ANYimport myself.
Show 5 quoted lines
> 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"?
Something like this?
use File::Path; my $file = "$git_dir/refs/tags/$xtag"; my ($dir) = $file =~ m/(.*)\//; mkpath($dir) && open C, ">$file";