Re: git-mv is not able to handle directory with one file in it
- From
- Alexander Litvinov <lan@ac-sw.com>
- Date
- Nov 23, 2005, 07:26 UTC
- Message-ID
- <200511231326.27972.lan@ac-sw.com>
- In-Reply-To
- <7voe4b7uw7.fsf@assigned-by-dhcp.cox.net>
I have found one error during directory movig: If I move directory with one file somewhere in it this script will try to add target directory instead of file. Commenting lines starting from 190 solve this error. But I don't understand what is the logic behind this case ? Why do target directory checked instead of target file ? Should we replace $dst my $destfiles[0] ?
at line 190 in git-mv:
if (scalar @srcfiles == 1) {
if ($overwritten{$dst} ==1) {
push @changedfiles, $dst;
} else {
push @addedfiles, $dst;
}
}
else {
push @addedfiles, @dstfiles;
}