Skip to content

Commit 0937a2b

Browse files
committed
using get-deps from tinyuf2
1 parent b5d4d0f commit 0937a2b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tools/get_deps.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,13 @@ def get_a_dep(d):
243243
p.mkdir(parents=True)
244244
run_cmd(f"{git_cmd} init")
245245
run_cmd(f"{git_cmd} remote add origin {url}")
246+
head = None
247+
else:
248+
# Check if commit is already fetched
249+
result = run_cmd(f"{git_cmd} rev-parse HEAD")
250+
head = result.stdout.decode("utf-8").splitlines()[0]
251+
run_cmd(f"{git_cmd} reset --hard")
246252

247-
# Check if commit is already fetched
248-
result = run_cmd(f"{git_cmd} rev-parse HEAD")
249-
head = result.stdout.decode("utf-8").splitlines()[0]
250-
run_cmd(f"{git_cmd} reset --hard")
251253
if commit != head:
252254
run_cmd(f"{git_cmd} fetch --depth 1 origin {commit}")
253255
run_cmd(f"{git_cmd} checkout FETCH_HEAD")

0 commit comments

Comments
 (0)