Created
June 25, 2019 10:12
-
-
Save vguerra/9f410398f84f3a9d04d4af519d01809f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/utils/update_checkout/update_checkout/update_checkout.py b/utils/update_checkout/update_checkout/update_checkout.py | |
index 56e7ea24d4..54fcb18107 100755 | |
--- a/utils/update_checkout/update_checkout/update_checkout.py | |
+++ b/utils/update_checkout/update_checkout/update_checkout.py | |
@@ -117,17 +117,17 @@ def update_single_repository(pool_args): | |
except Exception: | |
pass | |
- if checkout_target: | |
- shell.run(['git', 'status', '--porcelain', '-uno'], | |
- echo=False) | |
- shell.run(['git', 'checkout', checkout_target], echo=True) | |
- | |
# It's important that we checkout, fetch, and rebase, in order. | |
# .git/FETCH_HEAD updates the not-for-merge attributes based on | |
# which branch was checked out during the fetch. | |
shell.run(["git", "fetch", "--recurse-submodules=yes", "--tags"], | |
echo=True) | |
+ if checkout_target: | |
+ shell.run(['git', 'status', '--porcelain', '-uno'], | |
+ echo=False) | |
+ shell.run(['git', 'checkout', checkout_target], echo=True) | |
+ | |
# If we were asked to reset to the specified branch, do the hard | |
# reset and return. | |
if checkout_target and reset_to_remote and not cross_repo: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment