Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
contrib/git-svn: force GIT_DIR to an absolute path
author
Eric Wong
<normalperson@yhbt.net>
Thu, 30 Mar 2006 06:37:18 +0000
(22:37 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 30 Mar 2006 23:40:38 +0000
(15:40 -0800)
We chdir internally, so we need a consistent GIT_DIR variable.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/git-svn/git-svn.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ef5b4ea
)
diff --git
a/contrib/git-svn/git-svn.perl
b/contrib/git-svn/git-svn.perl
index 3e5733eed91c35dd0c52ebcc57b9d560373f89f5..59dd504047d739036a3ff666476641c2cf57e898 100755
(executable)
--- a/
contrib/git-svn/git-svn.perl
+++ b/
contrib/git-svn/git-svn.perl
@@
-9,7
+9,11
@@
$GIT_DIR $REV_DIR/;
$AUTHOR = 'Eric Wong <normalperson@yhbt.net>';
$VERSION = '0.11.0';
$GIT_DIR $REV_DIR/;
$AUTHOR = 'Eric Wong <normalperson@yhbt.net>';
$VERSION = '0.11.0';
-$GIT_DIR = $ENV{GIT_DIR} || "$ENV{PWD}/.git";
+
+use Cwd qw/abs_path/;
+$GIT_DIR = abs_path($ENV{GIT_DIR} || '.git');
+$ENV{GIT_DIR} = $GIT_DIR;
+
# make sure the svn binary gives consistent output between locales and TZs:
$ENV{TZ} = 'UTC';
$ENV{LC_ALL} = 'C';
# make sure the svn binary gives consistent output between locales and TZs:
$ENV{TZ} = 'UTC';
$ENV{LC_ALL} = 'C';
@@
-69,7
+73,6
@@
$GIT_SVN ||= $ENV{GIT_SVN_ID} || 'git-svn';
$GIT_SVN_INDEX = "$GIT_DIR/$GIT_SVN/index";
$GIT_SVN ||= $ENV{GIT_SVN_ID} || 'git-svn';
$GIT_SVN_INDEX = "$GIT_DIR/$GIT_SVN/index";
-$ENV{GIT_DIR} ||= $GIT_DIR;
$SVN_URL = undef;
$REV_DIR = "$GIT_DIR/$GIT_SVN/revs";
$SVN_WC = "$GIT_DIR/$GIT_SVN/tree";
$SVN_URL = undef;
$REV_DIR = "$GIT_DIR/$GIT_SVN/revs";
$SVN_WC = "$GIT_DIR/$GIT_SVN/tree";