diff options
author | Vicent Martà <vicent@github.com> | 2013-06-19 16:18:30 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-06-19 16:18:30 -0700 |
commit | 8b2fa181b2741661253c1d58cfa1077ade8bea24 (patch) | |
tree | be72b7dff741ca02f70899b8bf4955b997e569b2 /src/diff.c | |
parent | 5144850cb7c5f6aabef120f7ede2f5c587a7206a (diff) | |
parent | 7863523a1be51981bafee9d13b3344fb4ff47347 (diff) | |
download | libgit2-8b2fa181b2741661253c1d58cfa1077ade8bea24.tar.gz |
Merge pull request #1661 from arrbee/index-add-all
Index operations using globs
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/diff.c b/src/diff.c index fa2c5c71d..633601699 100644 --- a/src/diff.c +++ b/src/diff.c @@ -675,8 +675,10 @@ static int maybe_modified( } } - /* if oids and modes match, then file is unmodified */ - else if (git_oid_equal(&oitem->oid, &nitem->oid) && omode == nmode) + /* if oids and modes match (and are valid), then file is unmodified */ + else if (git_oid_equal(&oitem->oid, &nitem->oid) && + omode == nmode && + !git_oid_iszero(&oitem->oid)) status = GIT_DELTA_UNMODIFIED; /* if we have an unknown OID and a workdir iterator, then check some |