Merge pull request #16959 from ClickHouse/fix-bug-in-git-import

Fixed bug in git-import tool
This commit is contained in:
alexey-milovidov 2020-11-13 04:37:47 +03:00 committed by GitHub
commit 4fa3e6888d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -680,7 +680,7 @@ void updateSnapshot(Snapshot & snapshot, const Commit & commit, CommitDiff & fil
for (auto & elem : file_changes)
{
auto & file = elem.second.file_change;
if (file.path != file.old_path)
if (!file.old_path.empty() && file.path != file.old_path)
snapshot[file.path] = snapshot[file.old_path];
}