Commit b4626cb1 authored by Vincent Driessen's avatar Vincent Driessen

Merge branch 'develop' of github.com:nvie/gitflow into develop

parents 49305ec9 921ddf56
...@@ -17,5 +17,6 @@ Authors are (ordered by first commit date): ...@@ -17,5 +17,6 @@ Authors are (ordered by first commit date):
- Jon Bernard - Jon Bernard
- Olivier Mengué - Olivier Mengué
- Emre Berge Ergenekon - Emre Berge Ergenekon
- Eric Holmes
Portions derived from other open source works are clearly marked. Portions derived from other open source works are clearly marked.
...@@ -117,9 +117,15 @@ cmd_default() { ...@@ -117,9 +117,15 @@ cmd_default() {
# check existence in case of an already existing repo # check existence in case of an already existing repo
if [ "$should_check_existence" = "YES" ]; then if [ "$should_check_existence" = "YES" ]; then
git_local_branch_exists "$master_branch" || \ # if no local branch exists and a remote branch of the same
# name exists, checkout that branch and use it for master
if ! git_local_branch_exists "$master_branch" && \
git_remote_branch_exists "origin/$master_branch"; then
git branch "$master_branch" "origin/$master_branch" >/dev/null 2>&1
elif ! git_local_branch_exists "$master_branch"; then
die "Local branch '$master_branch' does not exist." die "Local branch '$master_branch' does not exist."
fi fi
fi
# store the name of the master branch # store the name of the master branch
git config gitflow.branch.master "$master_branch" git config gitflow.branch.master "$master_branch"
......
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