Skip to content

Commit

Permalink
Added a track command to git-flow-hotfix along the lines of the git-f…
Browse files Browse the repository at this point in the history
…low-feature track command
  • Loading branch information
vedang committed Mar 12, 2012
1 parent ab7fda2 commit 37f7d14
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions git-flow-hotfix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ usage() {
echo " git flow hotfix start [-F] <version> [<base>]"
echo " git flow hotfix finish [-Fsumpk] <version>"
echo " git flow hotfix publish <version>"
echo " git flow hotfix track <version>"
}

cmd_default() {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 37f7d14

Please sign in to comment.