summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Milligan <milli@acmeps.com>2007-06-05 00:06:30 -0600
committerJunio C Hamano <gitster@pobox.com>2007-06-06 15:23:35 -0700
commit23fcdc79713c47a6a0d50762b9311c9933a60d3f (patch)
treeee0236bc25759c58176a3b893062fbaff4bbf69c
parente59ade9f90de0eacdac06f52d39b74074fc664af (diff)
downloadgit-23fcdc79713c47a6a0d50762b9311c9933a60d3f.tar.gz
git-cvsimport: Make sure to use $git_dir always instead of .git sometimes
CVS import was failing on a couple repos I was trying to import. I was setting GIT_DIR=newproj.git and using the -i flag, but this bug was thwarting the effort... evil CVS. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-cvsimport.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index f68afe78a0..4e6c9c6cc7 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -692,8 +692,8 @@ sub commit {
if ($branch eq $opt_o && !$index{branch} && !get_headref($branch, $git_dir)) {
# looks like an initial commit
# use the index primed by git-init
- $ENV{GIT_INDEX_FILE} = '.git/index';
- $index{$branch} = '.git/index';
+ $ENV{GIT_INDEX_FILE} = "$git_dir/index";
+ $index{$branch} = "$git_dir/index";
} else {
# use an index per branch to speed up
# imports of projects with many branches
@@ -984,7 +984,7 @@ if ($line =~ /^(\d+) objects, (\d+) kilobytes$/) {
}
foreach my $git_index (values %index) {
- if ($git_index ne '.git/index') {
+ if ($git_index ne "$git_dir/index") {
unlink($git_index);
}
}