builtin/ls-files: convert overlay_tree_on_cache to object_id

This is another caller of parse_tree_indirect. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed May 6, 2017 at 22:10 UTC 6f37eb7d858ef7fff79ee083c98ee99ab9bc05a4
1 file changed +3 -3
builtin/ls-files.c
+3 -3
@@ -414,14 +414,14 @@ static void prune_cache(const char *prefix, size_t prefixlen)
414 void overlay_tree_on_cache(const char *tree_name, const char *prefix)
415 {
416 struct tree *tree;
417 - unsigned char sha1[20];
417 + struct object_id oid;
418 struct pathspec pathspec;
419 struct cache_entry *last_stage0 = NULL;
420 int i;
421
422 - if (get_sha1(tree_name, sha1))
422 + if (get_oid(tree_name, &oid))
423 die("tree-ish %s not found.", tree_name);
424 - tree = parse_tree_indirect(sha1);
424 + tree = parse_tree_indirect(oid.hash);
425 if (!tree)
426 die("bad tree-ish %s", tree_name);
427