# git-diff not coping with symlinks tonight

1 messages from 2008-08-20 to 2008-08-20. Participants: Jan Engelhardt.
Thread: https://gitlist.dev/t/15101

## Jan Engelhardt, 2008-08-20 03:54

Subject: git-diff not coping with symlinks tonight
Message-ID: <alpine.LNX.1.10.0808192351090.5691@fbirervta.pbzchgretzou.qr>
URL: https://gitlist.dev/e/alpine.LNX.1.10.0808192351090.5691%40fbirervta.pbzchgretzou.qr

```
Hi,


Once upon a git-status, a file was deemed changed:

23:50 kaven:~/Coding/pam_mount > git st
# On branch ofl
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   src/ofl-lib-nlt.c
#
no changes added to commit (use "git add" and/or "git commit -a")

So why did the symlink change we might ask:

23:50 kaven:~/Coding/pam_mount > strace -fe readlink git diff
Process 13185 attached (waiting for parent)
Process 13185 resumed (parent 13184 ready)
[pid 13185] readlink("src/ofl-lib-nlt.c", "ofl-lib.c", 25) = 9
Process 13185 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
error: readlink("src/ofl-lib-nlt.c"): No such file or directory
fatal: cannot hash src/ofl-lib-nlt.c

That's about it - /src/ofl-lib.c does exist, and hence the link is 
valid.

Observed on git 1.5.6.4.
Even a hard reset won't change anything.

23:52 kaven:~/Coding/pam_mount > git reset --hard
HEAD is now at 44a089b kill on logout support (unfinished)
23:53 kaven:~/Coding/pam_mount > git st
# On branch ofl
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   src/ofl-lib-nlt.c
#
no changes added to commit (use "git add" and/or "git commit -a")

Still modified. Any ideas?

```
