Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-cvsimport: Make sure to use $git_dir always instead of .git sometimes
author
Michael Milligan
<milli@acmeps.com>
Tue, 5 Jun 2007 06:06:30 +0000
(
00:06
-0600)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 6 Jun 2007 22:23:35 +0000
(15:23 -0700)
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>
git-cvsimport.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
e59ade9
)
diff --git
a/git-cvsimport.perl
b/git-cvsimport.perl
index f68afe78a0a0ea4997b8988f241cd3a675d785f9..4e6c9c6cc7c1fbbf69c455d6095cc8d18c81de16 100755
(executable)
--- 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
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
} else {
# use an index per branch to speed up
# imports of projects with many branches
@@
-984,7
+984,7
@@
sub commit {
}
foreach my $git_index (values %index) {
}
foreach my $git_index (values %index) {
- if ($git_index ne
'.git/index'
) {
+ if ($git_index ne
"$git_dir/index"
) {
unlink($git_index);
}
}
unlink($git_index);
}
}