fix: checkout the deploy branch when initializing a new repo
The initial-branch flag only works on newer versions of git - 2.28.0+ - and the init.defaultBranch config is otherwise also ignored until then.
This commit is contained in:
1 parent
9f3879b225
commit
70a1b6a863
1 file changed
+1
@@ -30,6 +30,7 @@ trigger-git-git-from-directory() {
|
|||||||
local DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
|
local DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
|
||||||
cp -rT "$SOURCECODE_WORK_DIR" "$TMP_WORK_DIR"
|
cp -rT "$SOURCECODE_WORK_DIR" "$TMP_WORK_DIR"
|
||||||
suppress_output fn-git-cmd "$TMP_WORK_DIR" init
|
suppress_output fn-git-cmd "$TMP_WORK_DIR" init
|
||||||
|
suppress_output fn-git-cmd "$TMP_WORK_DIR" checkout -b "$DEPLOY_BRANCH"
|
||||||
suppress_output fn-git-cmd "$TMP_WORK_DIR" config init.defaultBranch "$DEPLOY_BRANCH"
|
suppress_output fn-git-cmd "$TMP_WORK_DIR" config init.defaultBranch "$DEPLOY_BRANCH"
|
||||||
suppress_output fn-git-cmd "$TMP_WORK_DIR" config user.name "$USER_NAME"
|
suppress_output fn-git-cmd "$TMP_WORK_DIR" config user.name "$USER_NAME"
|
||||||
suppress_output fn-git-cmd "$TMP_WORK_DIR" config user.email "$USER_EMAIL"
|
suppress_output fn-git-cmd "$TMP_WORK_DIR" config user.email "$USER_EMAIL"
|
||||||
|
|||||||
Reference in new issue
Block a user