threads / discuss / 24886

git blame vs. directory symlinks

Subject: git blame vs. directory symlinks

## tl;dr

One message between Aug 27, 2010 and Aug 27, 2010.

replies: 0people: 1as markdown or json

Alexander Gladysh· Aug 27, 2010, 11:25 UTC · lore
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

← back to recent threads