From 04400b790d6938fce43148c2db835d913886085a Mon Sep 17 00:00:00 2001 From: Martin Moss Date: Thu, 3 Nov 2022 10:43:31 +0000 Subject: [PATCH] Fixup hotfix call --- gitfeatures/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gitfeatures/core.py b/gitfeatures/core.py index 56f996a..cd3b657 100644 --- a/gitfeatures/core.py +++ b/gitfeatures/core.py @@ -88,8 +88,11 @@ def finish_feature(name, prefix): def _branch_func(branch_type, args): if len(args) > 0 and args[0] == "new": - date = datetime.datetime.now() - branch = _get_branch_name(branch_type, date.strftime("%Y%m%d")) + prefix = "" + if len(args) == 2: + prefix = args[1] + name = "{}_{}".format(str(datetime.date.today()), prefix) + new_branch = _get_branch_name(branch_type, name) _call(["git", "checkout", "-b", new_branch]) _call(["git", "push", "-u", "origin", new_branch + ":" + new_branch])