diff options
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c index a5bf07a65..9abf8b9f5 100644 --- a/src/diff.c +++ b/src/diff.c @@ -470,7 +470,8 @@ static int maybe_modified( /* on platforms with no symlinks, preserve mode of existing symlinks */ if (S_ISLNK(omode) && S_ISREG(nmode) && - !(diff->diffcaps & GIT_DIFFCAPS_HAS_SYMLINKS)) + !(diff->diffcaps & GIT_DIFFCAPS_HAS_SYMLINKS) && + new_iter->type == GIT_ITERATOR_WORKDIR) nmode = omode; /* on platforms with no execmode, just preserve old mode */ |