Skip to content

Commit 48c450e

Browse files
authored
Merge pull request #3826 from gottesmm/update-checkout-2
Update checkout 2
2 parents 5a1f5e5 + 68661f9 commit 48c450e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

utils/update-checkout

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ def update_single_repository(repo_path, branch, reset_to_remote, should_clean):
3838

3939
print("--- Updating '" + repo_path + "' ---")
4040
with shell.pushd(repo_path, dry_run=False, echo=False):
41-
shell.call(["git", "fetch"], echo=False)
41+
shell.call(["git", "fetch"], echo=True)
4242

4343
if should_clean:
4444
shell.call(['git', 'clean', '-fdx'],
45-
echo=False)
45+
echo=True)
46+
shell.call(['git', 'reset', '--hard', 'HEAD'],
47+
echo=True)
4648

4749
if branch:
4850
status = shell.capture(['git', 'status', '--porcelain', '-uno'],
@@ -51,21 +53,21 @@ def update_single_repository(repo_path, branch, reset_to_remote, should_clean):
5153
print("Please, commit your changes.")
5254
print(status)
5355
exit(1)
54-
shell.call(['git', 'checkout', branch], echo=False)
56+
shell.call(['git', 'checkout', branch], echo=True)
5557

5658
# If we were asked to reset to the specified branch, do the hard
5759
# reset and return.
5860
if reset_to_remote:
5961
shell.call(['git', 'reset', '--hard', "origin/%s" % branch],
60-
echo=False)
62+
echo=True)
6163
return
6264

6365
# Prior to Git 2.6, this is the way to do a "git pull
6466
# --rebase" that respects rebase.autostash. See
6567
# http://stackoverflow.com/a/30209750/125349
66-
shell.call(["git", "rebase", "FETCH_HEAD"], echo=False)
68+
shell.call(["git", "rebase", "FETCH_HEAD"], echo=True)
6769
shell.call(["git", "submodule", "update", "--recursive"],
68-
echo=False)
70+
echo=True)
6971

7072

7173
def update_all_repositories(args, config, scheme_name):
@@ -119,10 +121,10 @@ def obtain_additional_swift_sources(
119121

120122
if skip_history:
121123
shell.call(['git', 'clone', '--recursive', '--depth', '1',
122-
remote, repo_name], echo=False)
124+
remote, repo_name], echo=True)
123125
else:
124126
shell.call(['git', 'clone', '--recursive', remote,
125-
repo_name], echo=False)
127+
repo_name], echo=True)
126128
if scheme_name:
127129
for v in config['branch-schemes'].values():
128130
if scheme_name not in v['aliases']:

0 commit comments

Comments
 (0)