Branch from current HEAD of each git, not a remote branch head

Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: Id793ccc01cc00f1d2b76c07ce56881a69f03a6a2
This commit is contained in:
Scott Little
2025-10-17 14:38:54 -04:00
parent c8826f94da
commit de26baa35f

View File

@@ -386,9 +386,12 @@ for subgit in $SUBGITS; do
fi
extra_args=""
if [ "${remote_branch}" != "" ]; then
extra_args="-t ${remote}/${remote_branch}"
fi
# I don't think we ever want to do this.
# Certainly not as an automatic behaviour.
# We should only branch from the current HEAD by default.
# if [ "${remote_branch}" != "" ]; then
# extra_args="-t ${remote}/${remote_branch}"
# fi
# check if destination branch already exists
branch_check=$(git branch -a --list $branch)
@@ -468,7 +471,8 @@ if [ $MANIFEST -eq 1 ]; then
fi
echo "Creating branch '$branch' in ${new_manifest_dir}"
git checkout -t ${remote}/${remote_branch} -b $branch
# git checkout -t ${remote}/${remote_branch} -b $branch
git checkout -b $branch
if [ $? != 0 ] ; then
echo_stderr "ERROR: failed to create branch '$branch' in ${new_manifest_dir}"
exit 1