Skip to content

Commit

Permalink
Revert 45d431a
Browse files Browse the repository at this point in the history
- The original change made the assumption that the git_branches[0]
  is the actual branch name that we are on, but that was incorrect.
  • Loading branch information
nikosmoum authored and FrostyX committed Aug 30, 2022
1 parent 4c4b126 commit 813713b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tito/release/distgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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):
Expand Down

0 comments on commit 813713b

Please sign in to comment.