# Defaulting fetch to origin when set in the repo-config

2 messages from 2006-07-22 to 2006-07-24. Participants: Santi Béjar, Junio C Hamano.
Thread: https://gitlist.dev/t/4951

## Santi Béjar, 2006-07-22 22:54

Subject: Defaulting fetch to origin when set in the repo-config
Message-ID: <87mzb1s11r.fsf@gmail.com>
URL: https://gitlist.dev/e/87mzb1s11r.fsf%40gmail.com

```

Signed-off-by: Santi Béjar <sbejar@gmail.com>

---

diff --git a/git-fetch.sh b/git-fetch.sh
index a393a50..c2eebee 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
 

```

## Junio C Hamano, 2006-07-24 07:31

Subject: Re: Defaulting fetch to origin when set in the repo-config
Message-ID: <7virlne9ww.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7virlne9ww.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <87mzb1s11r.fsf@gmail.com>

```
Thanks.

```
