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,11 +68,10 @@ done
|
||||
|
||||
case "$#" in
|
||||
0)
|
||||
test -f "$GIT_DIR/branches/origin" ||
|
||||
test -f "$GIT_DIR/remotes/origin" ||
|
||||
git-repo-config --get remote.origin.url >/dev/null ||
|
||||
die "Where do you want to fetch from today?"
|
||||
set origin ;;
|
||||
origin=$(get_default_remote)
|
||||
test -n "$(get_remote_url ${origin})" ||
|
||||
die "Where do you want to fetch from today?"
|
||||
set x $origin ; shift ;;
|
||||
esac
|
||||
|
||||
remote_nick="$1"
|
||||
|
||||
Reference in New Issue
Block a user