From 37f7d14b2f566390c824be6168ec730d11bb531e Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Mon, 12 Mar 2012 17:03:11 +0530 Subject: [PATCH] Added a track command to git-flow-hotfix along the lines of the git-flow-feature track command --- git-flow-hotfix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/git-flow-hotfix b/git-flow-hotfix index b355f3019..4ea87fc87 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -47,6 +47,7 @@ usage() { echo " git flow hotfix start [-F] []" echo " git flow hotfix finish [-Fsumpk] " echo " git flow hotfix publish " + echo " git flow hotfix track " } cmd_default() { @@ -216,6 +217,26 @@ cmd_publish() { echo } +cmd_track() { + parse_args "$@" + require_version_arg + + # sanity checks + require_clean_working_tree + require_branch_absent "$BRANCH" + git fetch -q "$ORIGIN" + require_branch "$ORIGIN/$BRANCH" + + # create tracking branch + git checkout -b "$BRANCH" "$ORIGIN/$BRANCH" + + echo + echo "Summary of actions:" + echo "- A new remote tracking branch '$BRANCH' was created" + echo "- You are now on branch '$BRANCH'" + echo +} + cmd_finish() { DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F DEFINE_boolean sign false "sign the release tag cryptographically" s