aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanti Béjar <sbejar@gmail.com>2006-07-23 00:54:40 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-24 00:32:24 -0700
commit5e27e27e5d3da5dcbe5fbfe204c2ade0128538a5 (patch)
tree1a3fd30792279fac80e592ebe3ac9bb690170085
parentce43697379ad8ffcaf061a4709489728c1dbe911 (diff)
downloadgit-5e27e27e5d3da5dcbe5fbfe204c2ade0128538a5.tar.gz
git-5e27e27e5d3da5dcbe5fbfe204c2ade0128538a5.tar.xz
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>
-rwxr-xr-xgit-fetch.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-fetch.sh b/git-fetch.sh
index b6a223ee4..f7167abdf 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