Commit 37f7d14b authored by Vedang Manerikar's avatar Vedang Manerikar

Added a track command to git-flow-hotfix along the lines of the git-flow-feature track command

parent ab7fda21
...@@ -47,6 +47,7 @@ usage() { ...@@ -47,6 +47,7 @@ usage() {
echo " git flow hotfix start [-F] <version> [<base>]" echo " git flow hotfix start [-F] <version> [<base>]"
echo " git flow hotfix finish [-Fsumpk] <version>" echo " git flow hotfix finish [-Fsumpk] <version>"
echo " git flow hotfix publish <version>" echo " git flow hotfix publish <version>"
echo " git flow hotfix track <version>"
} }
cmd_default() { cmd_default() {
...@@ -216,6 +217,26 @@ cmd_publish() { ...@@ -216,6 +217,26 @@ cmd_publish() {
echo 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() { cmd_finish() {
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
DEFINE_boolean sign false "sign the release tag cryptographically" s DEFINE_boolean sign false "sign the release tag cryptographically" s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment