diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-04-11 12:38:45 +0200 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-04-11 12:38:45 +0200 |
commit | dcfdb958e2033aa59beb624da4263ce031fbb21e (patch) | |
tree | f17365bd6314e8318d143a8f2e57659b31037519 /src/diff_output.c | |
parent | 73fe6a8e20ffbc18ad667ff519c0fb8adf85fc3e (diff) | |
parent | efef3795a2d29f6b99bb9575585bb3fc19c3ed79 (diff) | |
download | libgit2-dcfdb958e2033aa59beb624da4263ce031fbb21e.tar.gz |
Merge branch 'new-error-handling' of github.com:libgit2/libgit2 into new-error-handling
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; } } } |