@@ -153,7 +153,7 @@ def make_changelog_pr(auth, branch, repo, title, commit_message, body, dry_run=F
153
153
dirty = util .run ("git --no-pager diff --stat" ) != ""
154
154
if dirty :
155
155
util .run ("git stash" )
156
- util .run (f"git fetch origin { branch } " )
156
+ util .run (f"{ util . GIT_FETCH_CMD } { branch } " )
157
157
util .run (f"git checkout -b { pr_branch } origin/{ branch } " )
158
158
if dirty :
159
159
util .run ("git stash apply" )
@@ -530,7 +530,7 @@ def prep_git(ref, branch, repo, auth, username, url):
530
530
ref = ref or ""
531
531
532
532
# Make sure we have *all* tags
533
- util .run ("git fetch origin --tags --force --quiet " )
533
+ util .run (f" { util . GIT_FETCH_CMD } --tags --force " )
534
534
535
535
# Handle the ref
536
536
if ref .startswith ("refs/pull/" ):
@@ -541,11 +541,11 @@ def prep_git(ref, branch, repo, auth, username, url):
541
541
542
542
# Reuse existing branch if possible
543
543
if ref :
544
- util .run (f"git fetch origin +{ ref } :{ ref_alias } " )
545
- util .run (f"git fetch origin { ref } " )
544
+ util .run (f"{ util . GIT_FETCH_CMD } +{ ref } :{ ref_alias } " )
545
+ util .run (f"{ util . GIT_FETCH_CMD } { ref } " )
546
546
checkout_cmd = f"git checkout -B { branch } { ref_alias } "
547
547
else :
548
- util .run (f"git fetch origin { branch } " )
548
+ util .run (f"{ util . GIT_FETCH_CMD } { branch } " )
549
549
checkout_cmd = f"git checkout { branch } "
550
550
551
551
if checkout_exists :
@@ -597,7 +597,7 @@ def forwardport_changelog(
597
597
598
598
# switch to main branch here
599
599
branch = branch or util .get_default_branch ()
600
- util .run (f"git fetch origin { branch } " )
600
+ util .run (f" { branch } " )
601
601
util .run (f"git checkout { branch } " )
602
602
603
603
# Bail if the tag has been merged to the branch
0 commit comments