Re: [PATCH] git-svn.perl: Fix glob matching on svn paths
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 10, 2010, 06:15 UTC
- Message-ID
- <20101010061534.GB23100@burratino>
- In-Reply-To
- <1286615236-29732-2-git-send-email-ebik@ucw.cz>
Hi Tomáš,
Tomáš Ebenlendr wrote:
> I tried to convert our repositories to git. Our repositories have only > branches (no tags, and no branch is so special to be called trunk). > The directory of each individual branch live in the root of the > repository (i.e., not in directory 'branches' as in standard layout).
Okay, so I am imagining:
1.0.x/ 1.1.x/ 1.2.x/ 2.0.x/ ...
> I init the repository by: git svn init path_to_repo -b * > This triggers first bogus match in match_globs(): the pattern matches an > empty string - the place before first slash in any path.
A branches refspec of
*:refs/remotes/*
results in
$self{left} = ''
$self{glob} = '*'
$self{left_regex} = qr'^/(/|$)'
$self{regex} = qr'([^/]*)'.Does get_dir_globbed cope correctly? Will get_dir cope correctly with the spurious / (from $left/$de) inserted at the beginning of paths?
The regex always matches, even for empty $p, but it is not immediately obvious to me how that pans out. Could you describe the symptoms?
> We have created some branch names just by adding some suffix to another > branch name. Imagine branch "devel" and "devel2". Then there is bogus > match on path '/devel2' as it outputs 'devel'.
Is this problem reproducible without the other change? If so, would it makes sense to split off this fix as a separate patch?
Also, if Eric likes your patches, can he forge your sign-off? See Documentation/SubmittingPatches for what this means.
Thanks, Jonathan