diff options
author | Vicent Martà <vicent@github.com> | 2012-11-15 10:31:11 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2012-11-15 10:31:11 -0800 |
commit | 4a0c7f56ab45501ed53e6c0f8d68fa648c4b3dfc (patch) | |
tree | ae1097645f4ae0e0faec17340c279d0d0f948bdd /src/diff.c | |
parent | 63f7c6f4c8730e6ce1447a1c8b02c23c23d9682b (diff) | |
parent | c0d5acf69a647baa06bd5d8e570105b93b5070e7 (diff) | |
download | libgit2-4a0c7f56ab45501ed53e6c0f8d68fa648c4b3dfc.tar.gz |
Merge pull request #1074 from edubart/ignore_diff_filemode
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 728e23712..9cd6c1609 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; |