From 5e981bd21503cf81d58ad09e6f551dd4dd1f4eb0 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Sep 06 2017 13:01:58 +0000 Subject: Strip refs/heads/ from branch only once Even if this substring occurs multiple times, we should only strip it once. This should enable branches to contain it as a substring. It's probably not a very reasonable name, but better safe than sorry. Signed-off-by: Lubomír Sedlář --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index d5f04ba..186ac01 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -432,7 +432,7 @@ class Commands(object): raise rpkgError('Unable to find remote branch. Use --release') # Trim off the refs/heads so that we're just working with # the branch name - merge = merge.replace('refs/heads/', '') + merge = merge.replace('refs/heads/', '', 1) self._branch_merge = merge @property