git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git blame vs. directory symlinks

From
Alexander Gladysh <agladysh@gmail.com>
Date
Aug 27, 2010, 11:25 UTC
Message-ID
<AANLkTik-9H+KUjn-v7d4EeHaBn8=u5GjOi39T03EmCHG@mail.gmail.com>
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

Message 1 of 1 in “git blame vs. directory symlinks”
  1. Alexander GladyshAug 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.