Skip to content

Commit

Permalink
set remote head
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-el-sayed committed Oct 8, 2024
1 parent c901442 commit c65ddc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/manage_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ function docker_pull() {

function get_default_branch_name() {
local repo_path="$1"
git remote set-head origin --auto
echo $(
git -C "${repo_path}" symbolic-ref refs/remotes/origin/HEAD |
sed 's@^refs/remotes/origin/@@'
Expand All @@ -210,6 +211,7 @@ function get_default_branch_name() {

function get_parent_branch_name() {
local repo_path="$1"
git remote set-head origin --auto
echo $(
git -C ${repo_path} show-branch |
grep '\*' |
Expand Down

0 comments on commit c65ddc2

Please sign in to comment.