git-diff not coping with symlinks tonight
From: Jan Engelhardt <hidden>
Date: 2016-06-15 22:45:11
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?