From 813713b290569a7891463a54bbcd017953d2f471 Mon Sep 17 00:00:00 2001 From: Nikos Moumoulidis Date: Tue, 23 Aug 2022 14:31:07 +0200 Subject: [PATCH] Revert 45d431ad149cb33e2462a990c4c4f29e6bb2bb7e - The original change made the assumption that the git_branches[0] is the actual branch name that we are on, but that was incorrect. --- src/tito/release/distgit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tito/release/distgit.py b/src/tito/release/distgit.py index e6544ab1..48711095 100644 --- a/src/tito/release/distgit.py +++ b/src/tito/release/distgit.py @@ -552,7 +552,7 @@ def __init__(self, name=None, tag=None, build_dir=None, self.push_url = self.push_url.replace(MEAD_SCM_USERNAME, user) def _sync_mead_scm(self): - cmd = "git push --follow-tags %s %s" % (self.push_url, self.git_branches[0]) + cmd = "git push %s %s" % (self.push_url, self.builder.build_tag) if self.dry_run: self.print_dry_run_warning(cmd) @@ -565,9 +565,9 @@ def _sync_mead_scm(self): except RunCommandException as e: if "rejected" in e.output: if self._ask_yes_no("The remote rejected a push. Force push? [y/n] ", False): - run_command("git push --force --follow-tags %s %s" % (self.push_url, self.git_branches[0])) + run_command("git push --force %s %s" % (self.mead_scm, self.builder.build_tag)) else: - error_out("Could not sync with %s" % self.push_url) + error_out("Could not sync with %s" % self.mead_scm) raise def _git_release(self):