---
 builtin/blame.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/builtin/blame.c b/builtin/blame.c
index 0188115..80345db 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -928,9 +928,12 @@ static int pass_blame_to_parent(struct scoreboard *sb,
        /* The rest are the same as the parent */
        blame_chunk(&d.dstq, &d.srcq, INT_MAX, d.offset, INT_MAX, target, 
parent);
        *d.dstq = NULL;
-       parent->suspects = blame_merge(parent->suspects, newdest);
        if (parent->suspects)
+               parent->suspects = blame_merge(parent->suspects, newdest);
+       else if (newdest) {
+               parent->suspects = newdest;
                prio_queue_put(&sb->commits, parent->commit);
+       }
 
        return 0;
 }
@@ -1303,8 +1306,12 @@ static void pass_whole_blame(struct scoreboard *sb,
                origin_decref(e->suspect);
                e->suspect = porigin;
        }
-       porigin->suspects = blame_merge(porigin->suspects, suspects);
-       prio_queue_put(&sb->commits, porigin->commit);
+       if (porigin->suspects)
+               porigin->suspects = blame_merge(porigin->suspects, suspects);
+       else if (suspects) {
+               porigin->suspects = suspects;
+               prio_queue_put(&sb->commits, porigin->commit);
+       }
 }
 
 /*
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to