summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f77b100)
raw | patch | inline | side by side (parent: f77b100)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 12 May 2005 23:51:08 +0000 (16:51 -0700) | ||
committer | Petr Baudis <xpasky@machine.sinus.cz> | |
Fri, 13 May 2005 22:27:49 +0000 (00:27 +0200) |
Again I am not sure why this was missed during the last round,
but git-diff-files mishandles symlinks on the filesystem. This
patch fixes it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
And I'm not sure why did I miss this patch before. Sorry.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
but git-diff-files mishandles symlinks on the filesystem. This
patch fixes it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
And I'm not sure why did I miss this patch before. Sorry.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
diff-files.c | patch | blob | history |
diff --git a/diff-files.c b/diff-files.c
index c51edc3315100d8ec75eec72ec2f8a7e3753ad98..28f1b13b384dc122daf2b16574536e944b0f6291 100644 (file)
--- a/diff-files.c
+++ b/diff-files.c
continue;
oldmode = ntohl(ce->ce_mode);
- mode = S_IFREG | ce_permissions(st.st_mode);
+ mode = (S_ISLNK(st.st_mode) ? S_IFLNK :
+ S_IFREG | ce_permissions(st.st_mode));
show_modified(oldmode, mode, ce->sha1, null_sha1,
ce->name);