branches.append(branch.strip())
branch = 'topic/' + args.topic
+ try:
+ int(args.topic)
+ branch = 'ticket/' + args.topic
+ except ValueError:
+ pass
+
illegals = set(branches) & {'topic', branch}
# ensure there are no local branch names that will interfere with branch creation
push_ref = topic
except ValueError:
pass
+ if curr_branch.startswith('ticket/'):
+ topic = curr_branch[7:].strip()
+ try:
+ int(topic)
+ push_ref = topic
+ except ValueError:
+ pass
if push_ref is None:
push_ref = 'new'
else: