From 36d937121b016ca96da74a20de46df6c398afe6d Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 21 Nov 2023 18:54:08 -0700 Subject: [PATCH] repo_utils.ls_remote: Memoize Signed-off-by: Zack Cerza --- teuthology/repo_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 93ee225a33..03321fbf13 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -1,3 +1,4 @@ +import functools import logging import os import re @@ -56,6 +57,7 @@ def build_git_url(project, project_owner='ceph'): return url_templ.format(project_owner=project_owner, project=project) +@functools.lru_cache() def ls_remote(url, ref): """ Return the current sha1 for a given repository and ref -- 2.39.5