summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:17 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:17 +0900
commit4d8c4da9508384fc6e6a66189d759609f195cd5e (patch)
tree018ab24c70ef2ee5039b3986bd82583a2446ed81
parentMerge branch 'bc/hash-transition-16' (diff)
parentblame.c: don't drop origin blobs as eagerly (diff)
downloadtgif-4d8c4da9508384fc6e6a66189d759609f195cd5e.tar.xz
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
-rw-r--r--blame.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/blame.c b/blame.c
index 5c07dec190..c11c516921 100644
--- a/blame.c
+++ b/blame.c
@@ -1562,7 +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]);
}
}