Skip to contentSkip to conversation

Defaulting fetch to origin when set in the repo-config

PATCH Santi Béjar 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

---

git-fetch.sh +2 -1
index a393a50..c2eebee 100755
@@ -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