Skip to content
Snippets Groups Projects
Commit 8f53cfb0 authored by Richard Hartmann's avatar Richard Hartmann Committed by Dridi Boukelmoune
Browse files

vcsh: Initial support for cloning from branches other than master

parent 30643948
Branches
Tags
No related merge requests found
...@@ -146,9 +146,9 @@ clone() { ...@@ -146,9 +146,9 @@ clone() {
hook pre-clone hook pre-clone
init init
git remote add origin "$GIT_REMOTE" git remote add origin "$GIT_REMOTE"
git config branch.master.remote origin git config branch."$VCSH_BRANCH".remote origin
git config branch.master.merge refs/heads/master git config branch."$VCSH_BRANCH".merge refs/heads/$VCSH_BRANCH
if [ $(git ls-remote origin master 2> /dev/null | wc -l ) -lt 1 ]; then if [ $(git ls-remote origin $VCSH_BRANCH 2> /dev/null | wc -l ) -lt 1 ]; then
info "remote is empty, not merging anything" info "remote is empty, not merging anything"
exit exit
fi fi
...@@ -162,7 +162,7 @@ clone() { ...@@ -162,7 +162,7 @@ clone() {
[ x"$VCSH_CONFLICT" = x'1' ]) && [ x"$VCSH_CONFLICT" = x'1' ]) &&
fatal "will stop after fetching and not try to merge! fatal "will stop after fetching and not try to merge!
Once this situation has been resolved, run 'vcsh $VCSH_REPO_NAME pull' to finish cloning." 17 Once this situation has been resolved, run 'vcsh $VCSH_REPO_NAME pull' to finish cloning." 17
git merge origin/master git merge origin/master # XXX
hook post-merge hook post-merge
hook post-clone hook post-clone
retire retire
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment