diff options
author | Russell Belfer <arrbee@arrbee.com> | 2012-03-22 10:44:36 -0700 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2012-03-22 10:44:36 -0700 |
commit | 66142ae03134ef8a45e6bd304c6106a1685c3c99 (patch) | |
tree | 2a938d7439f419e4764e54040d787982efcffa71 /src/diff_output.c | |
parent | 95340398a1821bd19da1bfe459ba1f375ed89404 (diff) | |
download | libgit2-66142ae03134ef8a45e6bd304c6106a1685c3c99.tar.gz |
New status fixes
This adds support for roughly-right tracking of submodules
(although it does not recurse into submodules to detect
internal modifications a la core git), and it adds support
for including unmodified files in diff iteration if requested.
Diffstat (limited to 'src/diff_output.c')
-rw-r--r-- | src/diff_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/diff_output.c b/src/diff_output.c index 638cabca5..f4c214314 100644 --- a/src/diff_output.c +++ b/src/diff_output.c @@ -314,7 +314,8 @@ int git_diff_foreach( git_blob *old_blob = NULL, *new_blob = NULL; git_map old_data, new_data; - if (delta->status == GIT_DELTA_UNMODIFIED) + if (delta->status == GIT_DELTA_UNMODIFIED && + (diff->opts.flags & GIT_DIFF_INCLUDE_UNMODIFIED) == 0) continue; if (delta->status == GIT_DELTA_IGNORED && @@ -377,7 +378,8 @@ int git_diff_foreach( */ if (git_oid_cmp(&delta->old.oid, &delta->new.oid) == 0) { delta->status = GIT_DELTA_UNMODIFIED; - goto cleanup; + if ((diff->opts.flags & GIT_DIFF_INCLUDE_UNMODIFIED) == 0) + goto cleanup; } } } |