diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-12 12:07:33 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-14 15:23:12 +0200 |
commit | 2b2dfe80f065f284aa53351d7203e31cf001cf8a (patch) | |
tree | b893926ac9dd724269ad7095f72335809e947a98 /src/index.c | |
parent | 0a78a52ed9c6945151536d0f19aa39b081a4a8ac (diff) | |
download | libgit2-2b2dfe80f065f284aa53351d7203e31cf001cf8a.tar.gz |
index: include TYPECHANGE in the diff
Without this option, we would not be able to catch exec bit changes.
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 3d0f4d14d..8f0976d13 100644 --- a/src/index.c +++ b/src/index.c @@ -2681,8 +2681,9 @@ static int index_apply_to_wd_diff(git_index *index, int action, const git_strarr if ((error = git_pathspec__init(&ps, paths)) < 0) return error; + opts.flags = GIT_DIFF_INCLUDE_TYPECHANGE; if (action == INDEX_ACTION_ADDALL) { - opts.flags = GIT_DIFF_INCLUDE_UNTRACKED | GIT_DIFF_RECURSE_IGNORED_DIRS; + opts.flags |= GIT_DIFF_INCLUDE_UNTRACKED | GIT_DIFF_RECURSE_IGNORED_DIRS; if (flags == GIT_INDEX_ADD_FORCE) opts.flags |= GIT_DIFF_INCLUDE_IGNORED; } |