diff options
author | René Scharfe <l.s.r@web.de> | 2017-08-12 11:32:59 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-14 22:38:54 +0300 |
commit | 5c377d3d593d324346bbaa965cbff8870795b420 (patch) | |
tree | b2a517d5ec88c9b5c2618b80b0f45a74fdaf2638 /unpack-trees.c | |
parent | b3622a4ee94e4916cd05e6d96e41eeb36b941182 (diff) |
tree-walk: convert fill_tree_descriptor() to object_id
All callers of fill_tree_descriptor() have been converted to object_id
already, so convert that function as well. As a nice side-effect we get
rid of NULL checks in tree-diff.c, as fill_tree_descriptor() already
does them for us.
Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 862cfce661..233ec5eb3d 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -662,10 +662,10 @@ static int traverse_trees_recursive(int n, unsigned long dirmask, else if (i > 1 && are_same_oid(&names[i], &names[i - 2])) t[i] = t[i - 2]; else { - const unsigned char *sha1 = NULL; + const struct object_id *oid = NULL; if (dirmask & 1) - sha1 = names[i].oid->hash; - buf[nr_buf++] = fill_tree_descriptor(t+i, sha1); + oid = names[i].oid; + buf[nr_buf++] = fill_tree_descriptor(t + i, oid); } } |