mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-18 02:06:20 +08:00
Don't try to unlink non-existing alternates file
If you clone using alternates, but the checkout you are using as alternates does not have a submodule, there will be no alternates file for this submodule. Change-Id: Ibd9ed5454459587b6df9d420af4d66d61f4317ca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
944f23b42b
commit
aa431f407f
@@ -590,7 +590,9 @@ sub git_clone_one_submodule
|
||||
$self->exe('git', 'repack', '-a');
|
||||
|
||||
my $alternates_path = '.git/objects/info/alternates';
|
||||
unlink($alternates_path) || confess "unlink $alternates_path: $OS_ERROR";
|
||||
if (-e $alternates_path) {
|
||||
unlink($alternates_path) || confess "unlink $alternates_path: $OS_ERROR";
|
||||
}
|
||||
}
|
||||
|
||||
chdir("..") or confess "cd ..: $OS_ERROR";
|
||||
|
||||
Reference in New Issue
Block a user