Commit f6fcc4ee authored by Konstantin Tjuterev's avatar Konstantin Tjuterev

- Removed quoting in has $SOME_BRANCH $(get_remote_branches), as the check was always false

- Added fetching develop branch from origin when fetch flag is on in feature finish
parent baf66bef
......@@ -281,16 +281,17 @@ cmd_finish() {
require_clean_working_tree
# update local repo with remote changes first, if asked
if has "$ORIGIN/$BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$BRANCH" $(git_remote_branches); then
if flag fetch; then
git fetch -q "$ORIGIN" "$BRANCH"
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH"
fi
fi
if has "$ORIGIN/$BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$BRANCH" $(git_remote_branches); then
require_branches_equal "$BRANCH" "$ORIGIN/$BRANCH"
fi
if has "$ORIGIN/$DEVELOP_BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$DEVELOP_BRANCH" $(git_remote_branches); then
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
fi
......
......@@ -167,7 +167,7 @@ cmd_start() {
if flag fetch; then
git fetch -q "$ORIGIN" "$MASTER_BRANCH"
fi
if has "$ORIGIN/$MASTER_BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$MASTER_BRANCH" $(git_remote_branches); then
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
fi
......@@ -213,10 +213,10 @@ cmd_finish() {
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \
die "Could not fetch $DEVELOP_BRANCH from $ORIGIN."
fi
if has "$ORIGIN/$MASTER_BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$MASTER_BRANCH" $(git_remote_branches); then
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
fi
if has "$ORIGIN/$DEVELOP_BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$DEVELOP_BRANCH" $(git_remote_branches); then
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
fi
......
......@@ -164,7 +164,7 @@ cmd_start() {
if flag fetch; then
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH"
fi
if has "$ORIGIN/$DEVELOP_BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$DEVELOP_BRANCH" $(git_remote_branches); then
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
fi
......@@ -211,10 +211,10 @@ cmd_finish() {
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \
die "Could not fetch $DEVELOP_BRANCH from $ORIGIN."
fi
if has "$ORIGIN/$MASTER_BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$MASTER_BRANCH" $(git_remote_branches); then
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
fi
if has "$ORIGIN/$DEVELOP_BRANCH" "$(git_remote_branches)"; then
if has "$ORIGIN/$DEVELOP_BRANCH" $(git_remote_branches); then
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
fi
......
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