@@ -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" )
@@ -532,7 +532,7 @@ def prep_git(ref, branch, repo, auth, username, url):
532
532
ref = ref or ""
533
533
534
534
# Make sure we have *all* tags
535
- util .run ("git fetch origin --tags --force --quiet " )
535
+ util .run (f" { util . GIT_FETCH_CMD } --tags --force" )
536
536
537
537
# Handle the ref
538
538
if ref .startswith ("refs/pull/" ):
@@ -543,11 +543,11 @@ def prep_git(ref, branch, repo, auth, username, url):
543
543
544
544
# Reuse existing branch if possible
545
545
if ref :
546
- util .run (f"git fetch origin +{ ref } :{ ref_alias } " )
547
- util .run (f"git fetch origin { ref } " )
546
+ util .run (f"{ util . GIT_FETCH_CMD } +{ ref } :{ ref_alias } " )
547
+ util .run (f"{ util . GIT_FETCH_CMD } { ref } " )
548
548
checkout_cmd = f"git checkout -B { branch } { ref_alias } "
549
549
else :
550
- util .run (f"git fetch origin { branch } " )
550
+ util .run (f"{ util . GIT_FETCH_CMD } { branch } " )
551
551
checkout_cmd = f"git checkout { branch } "
552
552
553
553
if checkout_exists :
@@ -599,7 +599,7 @@ def forwardport_changelog(
599
599
600
600
# switch to main branch here
601
601
branch = branch or util .get_default_branch ()
602
- util .run (f"git fetch origin { branch } " )
602
+ util .run (f"{ util . GIT_FETCH_CMD } { branch } " )
603
603
util .run (f"git checkout { branch } " )
604
604
605
605
# Bail if the tag has been merged to the branch
0 commit comments