Skip to content
Snippets Groups Projects
Commit 32c8fa5d authored by Ronald Jäpel's avatar Ronald Jäpel
Browse files

Fix comparison of new checkout branch to first master commit. Instead compare...

Fix comparison of new checkout branch to first master commit. Instead compare to current master commit
parent b3236f46
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,13 @@ class BaseRepo:
:return:
"""
previous_branch = self.active_branch.name
if str(self.head.commit) == self.earliest_commit:
if previous_branch == "master":
return
commit_of_current_master = str(self._git.rev_parse("master"))
commit_of_current_branch = str(self.head.commit)
if commit_of_current_branch == commit_of_current_master:
print("Removing empty branch", previous_branch)
self._git.checkout("master")
self._git.branch("-d", previous_branch)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment