summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorTorsten Bögershausen <tboegi@web.de>2016-04-05 19:23:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-05 20:55:30 (GMT)
commita08feb8ef0b66c3e7d398ee6169c607b8efb7c80 (patch)
tree9370fdb4040df638fefc68800d2371cf5994e210 /builtin
parent765428699a5381f113d19974720bc91b5bfeaf1d (diff)
downloadgit-a08feb8ef0b66c3e7d398ee6169c607b8efb7c80.zip
git-a08feb8ef0b66c3e7d398ee6169c607b8efb7c80.tar.gz
git-a08feb8ef0b66c3e7d398ee6169c607b8efb7c80.tar.bz2
correct blame for files commited with CRLF
git blame reports lines as not "Not Committed Yet" when they have CRLF in the index, CRLF in the worktree and core.autocrlf is true. Since commit c4805393 (autocrlf: Make it work also for un-normalized repositories, 2010-05-12), files that have CRLF in the index are not normalized at commit when core.autocrl is set. Add a call to read_cache() early in fake_working_tree_commit(), before calling convert_to_git(). Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 048ed53..a5cabf7 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2275,6 +2275,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
unsigned mode;
struct strbuf msg = STRBUF_INIT;
+ read_cache();
time(&now);
commit = alloc_commit_node();
commit->object.parsed = 1;