summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7534ef)
raw | patch | inline | side by side (parent: c7534ef)
author | Jeff King <peff@peff.net> | |
Sun, 26 Oct 2008 04:46:21 +0000 (00:46 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 26 Oct 2008 21:09:48 +0000 (14:09 -0700) |
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>
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>
diff.c | patch | blob | history | |
t/t4030-diff-textconv.sh | patch | blob | history |
index 608223ab567b6e3be3ba9d572c858b3bf6fd25eb..23d454e71d4d22165d995d8fd321c86d2eeb84e4 100644 (file)
--- a/diff.c
+++ b/diff.c
{
if (!DIFF_FILE_VALID(one))
return NULL;
+ if (!S_ISREG(one->mode))
+ return NULL;
diff_filespec_load_driver(one);
return one->driver->textconv;
}
index 1df48ae12ae9e5770c26faf8de87fa0fa021bcb8..3945731e9a92eccffa6fcea4164da3bcbf991b3d 100755 (executable)
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
\ No newline at end of file
EOF
# make a symlink the hard way that works on symlink-challenged file systems
-test_expect_failure 'textconv does not act on symlinks' '
+test_expect_success 'textconv does not act on symlinks' '
echo -n frotz > file &&
git add file &&
git ls-files -s | sed -e s/100644/120000/ |