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

suggestion: store the URL somewhere in .git/

From
JCJeff Carr <jcarr@linuxmachines.com>
Date
Aug 22, 2005, 20:08 UTC
Message-ID
<430A30C8.3080908@linuxmachines.com>

It would be nice if the URL could be stored somewhere in .git/ This makes it a lot easier to update repositories because you don't always have to go and track down where you got it in the first place. Something like this perhaps:

~$ cat .git/location rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/ ~$ git-pull-script

Then something like below could be added to handle that easy enough.
Jeff

--- git-pull-script.orig 2005-07-31 22:23:50.000000000 -0700 +++ git-pull-script 2005-08-22 13:01:22.000000000 -0700

@@ -4,13 +4,24 @@
 # cogito.]
 #

+LOCATION="$@"
+
+if [ ! $LOCATION ]
+then
+	if [ -f .git/location ]
+	then
+		LOCATION=`cat .git/location`
+	fi
+fi
+
 . git-sh-setup-script || die "Not a git archive"
-. git-parse-remote "$@"
+. git-parse-remote "$LOCATION"
 merge_name="$_remote_name"

-git-fetch-script "$@" || exit 1
+git-fetch-script "$LOCATION" || exit 1

 git-resolve-script \
 	"$(cat "$GIT_DIR"/HEAD)" \
 	"$(cat "$GIT_DIR"/FETCH_HEAD)" \
 	"Merge $merge_name"
+
Next: Johannes Schindelin
Message 1 of 4 in “suggestion: store the URL somewhere in .git/”
  1. Jeff CarrAug 22, 2005
  2. Johannes SchindelinAug 22, 2005
  3. Jeff CarrAug 23, 2005
  4. Junio C HamanoAug 23, 2005

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.