Commit 9fbbb0ee by Edward Thomson Committed by GitHub

Merge pull request #3931 from libgit2/ethomson/checkout_dont_calculate_oid_for_dirs

checkout: don't try to calculate oid for directories
parents 89c332e4 955c99c2
......@@ -212,6 +212,10 @@ static bool checkout_is_workdir_modified(
if (baseitem->size && wditem->file_size != baseitem->size)
return true;
/* if the workdir item is a directory, it cannot be a modified file */
if (S_ISDIR(wditem->mode))
return false;
if (git_diff__oid_for_entry(&oid, data->diff, wditem, wditem->mode, NULL) < 0)
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment