Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Change git-cvsimport to handle slashes in CVS tags

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:10

Linus Torvalds [off-list ref] 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";
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help