mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-23 21:38:19 +00:00
Removed unnecessary condition
The variable noid is guaranteed to be zero at this point of the code path.
This commit is contained in:
parent
35df76bdd9
commit
cc93ad1650
@ -806,15 +806,12 @@ static int maybe_modified(
|
||||
* haven't calculated the OID of the new item, then calculate it now
|
||||
*/
|
||||
if (modified_uncertain && git_oid_iszero(&nitem->id)) {
|
||||
if (git_oid_iszero(&noid)) {
|
||||
const git_oid *update_check =
|
||||
DIFF_FLAG_IS_SET(diff, GIT_DIFF_UPDATE_INDEX) ?
|
||||
&oitem->id : NULL;
|
||||
|
||||
if ((error = git_diff__oid_for_entry(
|
||||
&noid, diff, nitem, update_check)) < 0)
|
||||
return error;
|
||||
}
|
||||
|
||||
/* if oid matches, then mark unmodified (except submodules, where
|
||||
* the filesystem content may be modified even if the oid still
|
||||
|
Loading…
Reference in New Issue
Block a user