Remove explicit checkout when ref given

pull/810/head
Tim Head 2019-11-07 23:15:29 +01:00
rodzic 75f2ca4b3a
commit ee38137aac
1 zmienionych plików z 3 dodań i 6 usunięć

Wyświetl plik

@ -48,12 +48,9 @@ class Git(ContentProvider):
"Failed to check out ref %s", ref, extra=dict(phase="failed")
)
raise ValueError("Failed to check out ref {}".format(ref))
# check out ref as it has not been done yet
for line in execute_cmd(
["git", "checkout", hash], cwd=output_dir, capture=yield_output
):
yield line
# If the hash is resolved above, we should be able to reset to it
# We don't need to explicitly checkout things as the reset will
# take of that. If the hash is resolved above, we should be
# able to reset to it
for line in execute_cmd(
["git", "reset", "--hard", hash], cwd=output_dir, capture=yield_output
):