summaryrefslogtreecommitdiff
path: root/git-fetch.sh
diff options
context:
space:
mode:
authorSanti Béjar <sbejar@gmail.com>2006-07-22 22:54:40 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-24 07:32:24 (GMT)
commit5e27e27e5d3da5dcbe5fbfe204c2ade0128538a5 (patch)
tree1a3fd30792279fac80e592ebe3ac9bb690170085 /git-fetch.sh
parentce43697379ad8ffcaf061a4709489728c1dbe911 (diff)
downloadgit-5e27e27e5d3da5dcbe5fbfe204c2ade0128538a5.zip
git-5e27e27e5d3da5dcbe5fbfe204c2ade0128538a5.tar.gz
git-5e27e27e5d3da5dcbe5fbfe204c2ade0128538a5.tar.bz2
Defaulting fetch to origin when set in the repo-config
Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-xgit-fetch.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-fetch.sh b/git-fetch.sh
index b6a223e..f7167ab 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -70,7 +70,8 @@ case "$#" in
0)
test -f "$GIT_DIR/branches/origin" ||
test -f "$GIT_DIR/remotes/origin" ||
- die "Where do you want to fetch from today?"
+ git-repo-config --get remote.origin.url >/dev/null ||
+ die "Where do you want to fetch from today?"
set origin ;;
esac