Skip to content

Commit

Permalink
Fixup hotfix call
Browse files Browse the repository at this point in the history
  • Loading branch information
martyzz1 committed Nov 3, 2022
1 parent 623fda2 commit 04400b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gitfeatures/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 04400b7

Please sign in to comment.