git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* suggestion: store the URL somewhere in .git/
@ 2005-08-22 20:08 Jeff Carr
  2005-08-22 20:18 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Carr @ 2005-08-22 20:08 UTC (permalink / raw)
  To: git

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"
+

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-23  5:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-22 20:08 suggestion: store the URL somewhere in .git/ Jeff Carr
2005-08-22 20:18 ` Johannes Schindelin
2005-08-23  1:46   ` Jeff Carr
2005-08-23  5:16     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).