Fix: unnecessary requirement of origin when creating a new feature branch.
Only test if local branch is behind origin if origin exists.
This commit is contained in:
parent
d79a0d45d3
commit
c118a85b44
1 changed files with 5 additions and 1 deletions
|
@ -182,7 +182,11 @@ cmd_start() {
|
||||||
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH"
|
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
# if the origin branch counterpart exists, assert that the local branch
|
||||||
|
# isn't behind it (to avoid unnecessary rebasing)
|
||||||
|
if git_branch_exists "$ORIGIN/$DEVELOP_BRANCH"; then
|
||||||
|
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
||||||
|
fi
|
||||||
|
|
||||||
# create branch
|
# create branch
|
||||||
if ! git checkout -b "$BRANCH" "$BASE"; then
|
if ! git checkout -b "$BRANCH" "$BASE"; then
|
||||||
|
|
Loading…
Reference in a new issue