diff options
-rw-r--r-- | git-update-agent | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/git-update-agent b/git-update-agent index 6f70c8b..b32305e 100644 --- a/git-update-agent +++ b/git-update-agent @@ -307,7 +307,6 @@ init_repo() { set -e git init &>/dev/null - git branch -M "$DEFAULT_BRANCH" git config "remote.${remote}.url" "$remote_url" git config "remote.${remote}.fetch" "+refs/heads/*:refs/remotes/$remote/*" set_should_track true @@ -318,24 +317,11 @@ init_repo() { fi set -e + git checkout "$DEFAULT_BRANCH" + git remote set-head "$remote" --auto >/dev/null - upstream_branch="$(upstream_branch "$remote")" - - if [[ -z "$upstream_branch" ]]; then - die_no_upstream_found "$remote" - fi - - remote_ref="$remote/$upstream_branch" - - git merge --ff --no-edit "$remote_ref" - - git branch --set-upstream-to="$remote_ref" "$DEFAULT_BRANCH" - - git reset --hard "$remote_ref" >/dev/null - trap - EXIT - set +e } |