diff options
author | Eduardo Bart <edub4rt@gmail.com> | 2012-11-15 14:43:21 -0200 |
---|---|---|
committer | Eduardo Bart <edub4rt@gmail.com> | 2012-11-15 14:59:39 -0200 |
commit | c0d5acf69a647baa06bd5d8e570105b93b5070e7 (patch) | |
tree | 5c203d38a72f21fa6231a4db5e4b86f494ac16d0 /src/diff.c | |
parent | 5a36f127808c7b470eef17b1a8a130dde0cc64a1 (diff) | |
download | libgit2-c0d5acf69a647baa06bd5d8e570105b93b5070e7.tar.gz |
Add option to ignore file mode in diffs
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c index 6f48d72a2..29ce97bb4 100644 --- a/src/diff.c +++ b/src/diff.c @@ -267,6 +267,9 @@ static git_diff_list *git_diff_list_alloc( memcpy(&diff->opts, opts, sizeof(git_diff_options)); + if(opts->flags & GIT_DIFF_IGNORE_FILEMODE) + diff->diffcaps = diff->diffcaps & ~GIT_DIFFCAPS_TRUST_MODE_BITS; + /* pathspec init will do nothing for empty pathspec */ if (git_pathspec_init(&diff->pathspec, &opts->pathspec, &diff->pool) < 0) goto fail; |