From f92a185109f1bb9d9ae52cc2b588628818d249af Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 18 Oct 2021 08:19:11 +0200 Subject: [PATCH] litex_setup: Fix git checkout to specific version (we are using short sha1 hashes). --- litex_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex_setup.py b/litex_setup.py index 3b84e2ae0..4c2167f80 100755 --- a/litex_setup.py +++ b/litex_setup.py @@ -136,7 +136,7 @@ if "init" in sys.argv[1:]: subprocess.check_call("git clone " + full_url + " " + opts, shell=True) if sha1 is not None: os.chdir(os.path.join(current_path, name)) - os.system("git checkout {:040x}".format(sha1)) + os.system("git checkout {:07x}".format(sha1)) # Repositories update if "update" in sys.argv[1:]: @@ -155,7 +155,7 @@ if "update" in sys.argv[1:]: subprocess.check_call("git submodule update --init --recursive", shell=True) if sha1 is not None: os.chdir(os.path.join(current_path, name)) - os.system("git checkout {:040x}".format(sha1)) + os.system("git checkout {:07x}".format(sha1)) # Repositories installation if "install" in sys.argv[1:]: