summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2021-08-24 21:46:46 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2021-08-24 21:46:46 -0500
commitac828ba769bad298cb3a404008409b0af11088c7 (patch)
treec5254c681314d326160959dc7183d398021eff8b
parent89419acab3b2225c240fb97ca0938e41a4c1cf44 (diff)
downloadgit-update-agent-0.0.3.tar.xz
git-update-agent-0.0.3.zip
Update for Ubuntu & git 2.25.1v0.0.3
-rw-r--r--git-update-agent18
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
}