Use dynamic branch instead of master to get remote in git-update
This commit is contained in:
parent
5f8431e7e2
commit
b5442b55c7
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ function current_branch() {
|
|||
}
|
||||
|
||||
ORIG_BRANCH=$(current_branch)
|
||||
DEFAULT_REMOTE=$(git config --get branch.master.remote)
|
||||
DEFAULT_REMOTE=$(git config --get branch.${ORIG_BRANCH}.remote)
|
||||
REMOTE="${1:-$DEFAULT_REMOTE}"
|
||||
if [[ "$ORIG_BRANCH" = "HEAD" ]]; then
|
||||
echo "Cannot update in a detached HEAD state"
|
||||
|
|
|
|||
Loading…
Reference in a new issue