summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-04-29 14:15:58 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-04-29 14:15:58 -0700
commit002dd773b0b2ff2e28a335fb879a321056c0f6e2 (patch)
tree1e37d9e1e84fba91dc89cf722d0b92e920990653 /builtin
parentMerge branch 'sk/send-pack-all-fix' into maint (diff)
parentcorrect blame for files commited with CRLF (diff)
downloadtgif-002dd773b0b2ff2e28a335fb879a321056c0f6e2.tar.xz
Merge branch 'tb/blame-force-read-cache-to-workaround-safe-crlf' into maint
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')
-rw-r--r--builtin/blame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index e982fb8137..21f42b0b62 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;