Merge pull request #810 from betatim/no-checkout-detached-heads

[MRG] Remove explicit checkout when ref given
pull/818/head
Chris Holdgraf 2019-11-09 07:47:43 -07:00 zatwierdzone przez GitHub
commit 242107b0c4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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") "Failed to check out ref %s", ref, extra=dict(phase="failed")
) )
raise ValueError("Failed to check out ref {}".format(ref)) raise ValueError("Failed to check out ref {}".format(ref))
# check out ref as it has not been done yet # We don't need to explicitly checkout things as the reset will
for line in execute_cmd( # take of that. If the hash is resolved above, we should be
["git", "checkout", hash], cwd=output_dir, capture=yield_output # able to reset to it
):
yield line
# If the hash is resolved above, we should be able to reset to it
for line in execute_cmd( for line in execute_cmd(
["git", "reset", "--hard", hash], cwd=output_dir, capture=yield_output ["git", "reset", "--hard", hash], cwd=output_dir, capture=yield_output
): ):