1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-09 18:46:11 +02:00

git-svn: remove files from the index before adding/updating

This fixes a bug when importing where a directory gets removed/renamed
but is immediately replaced by a file of the same name in the same
revision.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
Eric Wong 2006-02-17 21:04:47 -08:00 committed by Junio C Hamano
parent 45d2b286ac
commit 0870321548

View File

@ -580,13 +580,12 @@ sub svn_info {
sub sys { system(@_) == 0 or croak $? }
sub git_addremove {
system( "git-ls-files -z --others ".
system( "git-diff-files --name-only -z ".
" | git-update-index --remove -z --stdin; ".
"git-ls-files -z --others ".
"'--exclude-from=$GIT_DIR/$GIT_SVN/info/exclude'".
"| git-update-index --add -z --stdin; ".
"git-ls-files -z --deleted ".
"| git-update-index --remove -z --stdin; ".
"git-ls-files -z --modified".
"| git-update-index -z --stdin") == 0 or croak $?
" | git-update-index --add -z --stdin; "
) == 0 or croak $?
}
sub s_to_file {