Merge branch 'bw/protocol-v2'
[gitweb.git] / blame.c
diff --git a/blame.c b/blame.c
index 08c0c6cf73c349a2b7ad6fe129443852318a5044..d5f7b7237c4e9f9dcb6ad37504a98a0fcff66f80 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -337,9 +337,7 @@ static void fill_origin_blob(struct diff_options *opt,
 
 static void drop_origin_blob(struct blame_origin *o)
 {
-       if (o->file.ptr) {
-               FREE_AND_NULL(o->file.ptr);
-       }
+       FREE_AND_NULL(o->file.ptr);
 }
 
 /*
@@ -1459,14 +1457,14 @@ static void pass_blame(struct blame_scoreboard *sb, struct blame_origin *origin,
                        porigin = find(p, origin);
                        if (!porigin)
                                continue;
-                       if (!oidcmp(&porigin->blob_oid, &origin->blob_oid)) {
+                       if (oideq(&porigin->blob_oid, &origin->blob_oid)) {
                                pass_whole_blame(sb, origin, porigin);
                                blame_origin_decref(porigin);
                                goto finish;
                        }
                        for (j = same = 0; j < i; j++)
                                if (sg_origin[j] &&
-                                   !oidcmp(&sg_origin[j]->blob_oid, &porigin->blob_oid)) {
+                                   oideq(&sg_origin[j]->blob_oid, &porigin->blob_oid)) {
                                        same = 1;
                                        break;
                                }
@@ -1834,7 +1832,7 @@ void setup_scoreboard(struct blame_scoreboard *sb,
 
                sb->revs->children.name = "children";
                while (c->parents &&
-                      oidcmp(&c->object.oid, &sb->final->object.oid)) {
+                      !oideq(&c->object.oid, &sb->final->object.oid)) {
                        struct commit_list *l = xcalloc(1, sizeof(*l));
 
                        l->item = c;
@@ -1844,7 +1842,7 @@ void setup_scoreboard(struct blame_scoreboard *sb,
                        c = c->parents->item;
                }
 
-               if (oidcmp(&c->object.oid, &sb->final->object.oid))
+               if (!oideq(&c->object.oid, &sb->final->object.oid))
                        die(_("--reverse --first-parent together require range along first-parent chain"));
        }