aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-10-26 00:46:21 -0400
committerJunio C Hamano <gitster@pobox.com>2008-10-26 14:09:48 -0700
commit2675773af893ae81f9b09f18c1f2ec86ca2158e7 (patch)
tree8f0fed7f4cbfb7f74804c574e698079899906fea /diff.c
parentc7534ef4a12bb44806d522fc8e3961e390f9169b (diff)
downloadgit-2675773af893ae81f9b09f18c1f2ec86ca2158e7.tar.gz
git-2675773af893ae81f9b09f18c1f2ec86ca2158e7.tar.xz
only textconv regular files
We treat symlinks as text containing the results of the symlink, so it doesn't make much sense to text-convert them. Similarly gitlink components just end up as the text "Subproject commit $sha1", which we should leave intact. Note that a typechange may be broken into two parts: the removal of the old part and the addition of the new. In that case, we _do_ show the textconv for any part which is the addition or removal of a file we would ordinarily textconv, since it is purely acting on the file contents. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index 608223ab5..23d454e71 100644
--- a/diff.c
+++ b/diff.c
@@ -1311,6 +1311,8 @@ static const char *get_textconv(struct diff_filespec *one)
{
if (!DIFF_FILE_VALID(one))
return NULL;
+ if (!S_ISREG(one->mode))
+ return NULL;
diff_filespec_load_driver(one);
return one->driver->textconv;
}