Skip to content

Commit 6f37eb7

Browse files
bk2204gitster
authored andcommitted
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>
1 parent 4939e2c commit 6f37eb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/ls-files.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,14 @@ static void prune_cache(const char *prefix, size_t prefixlen)
414414
void overlay_tree_on_cache(const char *tree_name, const char *prefix)
415415
{
416416
struct tree *tree;
417-
unsigned char sha1[20];
417+
struct object_id oid;
418418
struct pathspec pathspec;
419419
struct cache_entry *last_stage0 = NULL;
420420
int i;
421421

422-
if (get_sha1(tree_name, sha1))
422+
if (get_oid(tree_name, &oid))
423423
die("tree-ish %s not found.", tree_name);
424-
tree = parse_tree_indirect(sha1);
424+
tree = parse_tree_indirect(oid.hash);
425425
if (!tree)
426426
die("bad tree-ish %s", tree_name);
427427

0 commit comments

Comments
 (0)