Fetch: default remote repository from branch properties
If in branch "foo" and this in config:
[branch "foo"]
remote=bar
"git fetch" = "git fetch bar"
"git pull" = "git pull bar"
Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
ed1795fcc5
commit
648ad18f50
@ -68,6 +68,12 @@ get_remote_url () {
|
||||
esac
|
||||
}
|
||||
|
||||
get_default_remote () {
|
||||
curr_branch=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||')
|
||||
origin=$(git-repo-config --get "branch.$curr_branch.remote")
|
||||
echo ${origin:-origin}
|
||||
}
|
||||
|
||||
get_remote_default_refs_for_push () {
|
||||
data_source=$(get_data_source "$1")
|
||||
case "$data_source" in
|
||||
|
||||
Reference in New Issue
Block a user