git blame vs. directory symlinks

From: Alexander Gladysh <hidden>
Date: 2016-06-15 22:49:23

Hi, list!

OS X 10.6.4
git version 1.7.2.2

Another bug with symlinked directories.

The git blame works correctly for the symliked files, displaying the
history for the symlink source.

However, if the symlink is not the file itself, but a directory in
path, git blame reports the file as "not committed yet".

See minimal example below.

HTH,
Alexander.

mkdir repo && cd repo
git init
mkdir alpha
echo "one" > alpha/file.txt
git add .
git commit -m "initial commit"
echo "two" >> alpha/file.txt
git commit -a -m "updated alpha"
ln -s alpha beta
git add .
git commit -m "beta symlink"

git blame alpha/file.txt
^33848ab (Alexander Gladysh 2010-08-27 15:16:16 +0400 1) one
5afed689 (Alexander Gladysh 2010-08-27 15:16:35 +0400 2) two

git blame beta/file.txt
00000000 (Not Committed Yet 2010-08-27 15:17:04 +0400 1) one
00000000 (Not Committed Yet 2010-08-27 15:17:04 +0400 2) two
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help