summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d6d3346)
raw | patch | inline | side by side (parent: d6d3346)
author | Eric Wong <normalperson@yhbt.net> | |
Fri, 16 Feb 2007 12:09:28 +0000 (04:09 -0800) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Feb 2007 08:57:13 +0000 (00:57 -0800) |
Having it named as 'config' prevents us from tracking a
ref named 'config', which is a huge mistake.
On the non-technical side, the word 'config' implies that
a user can freely modify it; but that's not the case
here.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
ref named 'config', which is a huge mistake.
On the non-technical side, the word 'config' implies that
a user can freely modify it; but that's not the case
here.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history | |
t/t9107-git-svn-migrate.sh | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index d7fc9aad52fc1a9248b12057110ca6e549df4b09..571259fd098d7aa5ea280cdfb3c799f32492087c 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
sub tmp_config {
my (@args) = @_;
- my $config = "$ENV{GIT_DIR}/svn/config";
+ my $old_def_config = "$ENV{GIT_DIR}/svn/config";
+ my $config = "$ENV{GIT_DIR}/svn/.metadata";
+ if (-e $old_def_config && ! -e $config) {
+ rename $old_def_config, $config or
+ die "Failed rename $old_def_config => $config: $!\n";
+ }
my $old_config = $ENV{GIT_CONFIG};
$ENV{GIT_CONFIG} = $config;
$@ = undef;
index a20038b6705a380e93983a23d4a6671b2d5944bf..dc2afdaa4561ce037239907297718dba1fa33ce6 100755 (executable)
git-svn init $svnrepo &&
git-svn fetch &&
mv $GIT_DIR/svn/* $GIT_DIR/ &&
+ mv $GIT_DIR/svn/.metadata $GIT_DIR/ &&
rmdir $GIT_DIR/svn &&
git-update-ref refs/heads/git-svn-HEAD refs/remotes/git-svn &&
git-update-ref refs/heads/svn-HEAD refs/remotes/git-svn &&