git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Defaulting fetch to origin when set in the repo-config

From
SBSanti Béjar <sbejar@gmail.com>
Date
Jul 22, 2006, 22:54 UTC
Message-ID
<87mzb1s11r.fsf@gmail.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
 
Next: Junio C Hamano
Message 1 of 2 in “Defaulting fetch to origin when set in the repo-config”
  1. Santi BéjarJul 22, 2006
  2. Junio C HamanoJul 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.