Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Fix branch existence checks of hotfix track #376

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

blooper05
Copy link

Fixes #248.

I've fixed branch existence checks of hotfix track command with reference to the following release track command.

cmd_track() {
OPTIONS_SPEC="\
git flow release track [-h] <name>
Start tracking release <name> that is shared on $ORIGIN
--
h,help Show this help
showcommands! Show git commands while executing them
"
# Parse arguments
parse_args "$@"
gitflow_require_version_arg
# Sanity checks
require_clean_working_tree
require_local_branch_absent "$BRANCH"
run_pre_hook "$VERSION" "$ORIGIN" "$BRANCH"
git_do fetch -q "$ORIGIN" || die "Could not fetch branch '$BRANCH' from remote '$ORIGIN'."
git_remote_branch_exists "$ORIGIN/$BRANCH"
# Create tracking branch
git_do checkout -b "$BRANCH" "$ORIGIN/$BRANCH" || die "Could not create branch '$BRANCH'."
run_post_hook "$VERSION" "$ORIGIN" "$BRANCH"
echo
echo "Summary of actions:"
echo "- A new remote tracking branch '$BRANCH' was created"
echo "- You are now on branch '$(git_current_branch)'"
echo
}

Please check my changes and merge them if you can. Thanks!

@ChrisJStone
Copy link

I'm in the process of updating gitflow. If you could kindly resubmit your pull request against my fork here as it appears this fork is no longer being updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'git flow hotfix track' fails due to branch name check
2 participants