aboutsummaryrefslogtreecommitdiff
path: root/diff-files.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2005-05-06 15:45:01 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-06 08:41:12 -0700
commitffbe1addd5a5b7b7c2f987625a5aa6c1d22e3705 (patch)
tree68127262b118858d0dc4d898a3b89d78be6180cf /diff-files.c
parent20d37ef67286e5131d2333d7b4662bc70f9d4937 (diff)
downloadgit-ffbe1addd5a5b7b7c2f987625a5aa6c1d22e3705.tar.gz
git-ffbe1addd5a5b7b7c2f987625a5aa6c1d22e3705.tar.xz
[PATCH] fix compare symlink against readlink not data
Fix update-cache to compare the blob of a symlink against the link-target and not the file it points to. Also ignore all permissions applied to links. Thanks to Greg for recognizing this while he added our list of symlinks back to the udev repository. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff-files.c')
-rw-r--r--diff-files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff-files.c b/diff-files.c
index 0cf2c2441..c51edc331 100644
--- a/diff-files.c
+++ b/diff-files.c
@@ -111,7 +111,7 @@ int main(int argc, char **argv)
continue;
}
- if (stat(ce->name, &st) < 0) {
+ if (lstat(ce->name, &st) < 0) {
if (errno != ENOENT) {
perror(ce->name);
continue;