]> git.ipfire.org Git - thirdparty/git.git/blobdiff - tree-diff.c
hash: provide per-algorithm null OIDs
[thirdparty/git.git] / tree-diff.c
index 7cebbb327e273aadd5106ddf2140637d39f1d4a4..1572615bd9a7eeac84aef5a41f0e2443cae6417a 100644 (file)
@@ -161,7 +161,7 @@ static struct combine_diff_path *path_appendnew(struct combine_diff_path *last,
        memcpy(p->path + base->len, path, pathlen);
        p->path[len] = 0;
        p->mode = mode;
-       oidcpy(&p->oid, oid ? oid : &null_oid);
+       oidcpy(&p->oid, oid ? oid : null_oid());
 
        return p;
 }
@@ -243,7 +243,7 @@ static struct combine_diff_path *emit_path(struct combine_diff_path *p,
                                mode_i = tp[i].entry.mode;
                        }
                        else {
-                               oid_i = &null_oid;
+                               oid_i = null_oid();
                                mode_i = 0;
                        }