summaryrefslogtreecommitdiff
path: root/builtin/ls-files.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-08 06:12:58 (GMT)
commit6f37eb7d858ef7fff79ee083c98ee99ab9bc05a4 (patch)
treed1d023a1b65911e4dab35de85e5b5e7bbd926e31 /builtin/ls-files.c
parent4939e2c435529095059faa72a4004a4849fb8682 (diff)
downloadgit-6f37eb7d858ef7fff79ee083c98ee99ab9bc05a4.zip
git-6f37eb7d858ef7fff79ee083c98ee99ab9bc05a4.tar.gz
git-6f37eb7d858ef7fff79ee083c98ee99ab9bc05a4.tar.bz2
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>
Diffstat (limited to 'builtin/ls-files.c')
-rw-r--r--builtin/ls-files.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index a6c70db..da0ff84 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -414,14 +414,14 @@ static void prune_cache(const char *prefix, size_t prefixlen)
void overlay_tree_on_cache(const char *tree_name, const char *prefix)
{
struct tree *tree;
- unsigned char sha1[20];
+ struct object_id oid;
struct pathspec pathspec;
struct cache_entry *last_stage0 = NULL;
int i;
- if (get_sha1(tree_name, sha1))
+ if (get_oid(tree_name, &oid))
die("tree-ish %s not found.", tree_name);
- tree = parse_tree_indirect(sha1);
+ tree = parse_tree_indirect(oid.hash);
if (!tree)
die("bad tree-ish %s", tree_name);