summaryrefslogtreecommitdiff
path: root/builtin/blame.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-13 21:12:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-13 21:12:41 (GMT)
commit6680016e9d7450895de11da04921b7ca2818aca2 (patch)
tree8842ce3f203b10bc12a37d2014a74c77b03c4da7 /builtin/blame.c
parentf0442976149da225fd9e7796436b2122a6bb7f0f (diff)
parenta08feb8ef0b66c3e7d398ee6169c607b8efb7c80 (diff)
downloadgit-6680016e9d7450895de11da04921b7ca2818aca2.zip
git-6680016e9d7450895de11da04921b7ca2818aca2.tar.gz
git-6680016e9d7450895de11da04921b7ca2818aca2.tar.bz2
Merge branch 'tb/blame-force-read-cache-to-workaround-safe-crlf'
When running "git blame $path" with unnormalized data in the index for the path, the data in the working tree was blamed, even though "git add" would not have changed what is already in the index, due to "safe crlf" that disables the line-end conversion. It has been corrected. * tb/blame-force-read-cache-to-workaround-safe-crlf: correct blame for files commited with CRLF
Diffstat (limited to 'builtin/blame.c')
-rw-r--r--builtin/blame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index e982fb8..21f42b0 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2307,6 +2307,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;