Kar*_*arl 3 svn git spaces dcommit
当尝试访问git svn dcommit
其名称中包含空格的存储库时,我收到以下错误:
Committing to http://svn.kuluvalley.com/Meet the Expert/trunk ...
http://svn.kuluvalley.com/Meet the Expert/trunk
Filesystem has no item: '/!svn/bc/7397/Meet' path not found at /usr/libexec/git-core/git svn line 592
Run Code Online (Sandbox Code Playgroud)
看起来git svn
它不支持带有空格的目录.
git svn
通过修补git-svn,我能够解决不能使用空格的存储库的问题.
我将url_path
功能更新为:
sub url_path {
my ($self, $path) = @_;
my $url = $self->{url} . '/' . $self->repo_path($path);
if ($self->{url} =~ m#^https?://#) {
$url =~ s!([^~a-zA-Z0-9_./-])!uc sprintf("%%%02x",ord($1))!eg;
$url =~ s!^(https?)%3A//!$1://!;
}
$url
}
Run Code Online (Sandbox Code Playgroud)
对于windows(x64)用户,可以在Editor.pm文件中找到此函数,该文件位于
{Git安装文件夹}\mingw64\share\perl5\site_perl\Git\SVN \
这可确保url中的空格被正确编码.
它似乎对我有用,但尚未经过彻底测试.
归档时间: |
|
查看次数: |
1392 次 |
最近记录: |