From: Junio C Hamano Date: Thu, 25 Apr 2019 07:41:17 +0000 (+0900) Subject: Merge branch 'dk/blame-keep-origin-blob' X-Git-Tag: v2.22.0-rc0~57 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/4d8c4da9508384fc6e6a66189d759609f195cd5e?hp=-c Merge branch 'dk/blame-keep-origin-blob' Performance fix around "git blame", especially in a linear history (which is the norm we should optimize for). * dk/blame-keep-origin-blob: blame.c: don't drop origin blobs as eagerly --- 4d8c4da9508384fc6e6a66189d759609f195cd5e diff --combined blame.c index 5c07dec190,4e9ccd0922..c11c516921 --- a/blame.c +++ b/blame.c @@@ -204,8 -204,7 +204,8 @@@ static struct commit *fake_working_tree origin = make_origin(commit, path); - ident = fmt_ident("Not Committed Yet", "not.committed.yet", NULL, 0); + ident = fmt_ident("Not Committed Yet", "not.committed.yet", + WANT_BLANK_IDENT, NULL, 0); strbuf_addstr(&msg, "tree 0000000000000000000000000000000000000000\n"); for (parent = commit->parents; parent; parent = parent->next) strbuf_addf(&msg, "parent %s\n", @@@ -1562,7 -1561,8 +1562,8 @@@ finish } for (i = 0; i < num_sg; i++) { if (sg_origin[i]) { - drop_origin_blob(sg_origin[i]); + if (!sg_origin[i]->suspects) + drop_origin_blob(sg_origin[i]); blame_origin_decref(sg_origin[i]); } }