mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-08 18:43:48 +00:00
Return GIT_DELTA_UNREADABLE for a file with a mode change
This commit is contained in:
parent
6580b11c2a
commit
e8cc3032c1
@ -747,6 +747,11 @@ static int maybe_modified(
|
|||||||
else if (GIT_MODE_TYPE(omode) != GIT_MODE_TYPE(nmode)) {
|
else if (GIT_MODE_TYPE(omode) != GIT_MODE_TYPE(nmode)) {
|
||||||
if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_INCLUDE_TYPECHANGE))
|
if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_INCLUDE_TYPECHANGE))
|
||||||
status = GIT_DELTA_TYPECHANGE;
|
status = GIT_DELTA_TYPECHANGE;
|
||||||
|
else if (nmode == GIT_FILEMODE_UNREADABLE) {
|
||||||
|
if (!(error = diff_delta__from_one(diff, GIT_DELTA_DELETED, oitem)))
|
||||||
|
error = diff_delta__from_one(diff, GIT_DELTA_UNREADABLE, nitem);
|
||||||
|
return error;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (!(error = diff_delta__from_one(diff, GIT_DELTA_DELETED, oitem)))
|
if (!(error = diff_delta__from_one(diff, GIT_DELTA_DELETED, oitem)))
|
||||||
error = diff_delta__from_one(diff, GIT_DELTA_ADDED, nitem);
|
error = diff_delta__from_one(diff, GIT_DELTA_ADDED, nitem);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user