From: Junio C Hamano Date: Fri, 28 Oct 2005 20:29:27 GMT Subject: Re: [PATCH] Change git-cvsimport to handle slashes in CVS tags Message-ID: <7vmzkt4c7s.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds 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. > 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";