git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Carr <jcarr@linuxmachines.com>
To: git@vger.kernel.org
Subject: suggestion: store the URL somewhere in .git/
Date: Mon, 22 Aug 2005 13:08:40 -0700	[thread overview]
Message-ID: <430A30C8.3080908@linuxmachines.com> (raw)

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

             reply	other threads:[~2005-08-22 20:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-22 20:08 Jeff Carr [this message]
2005-08-22 20:18 ` suggestion: store the URL somewhere in .git/ Johannes Schindelin
2005-08-23  1:46   ` Jeff Carr
2005-08-23  5:16     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=430A30C8.3080908@linuxmachines.com \
    --to=jcarr@linuxmachines.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).