From: Jeff Carr <jcarr@linuxmachines.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: suggestion: store the URL somewhere in .git/
Date: Mon, 22 Aug 2005 18:46:14 -0700 [thread overview]
Message-ID: <430A7FE6.4010801@linuxmachines.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0508222217310.695@wgmdd8.biozentrum.uni-wuerzburg.de>
On 08/22/2005 01:18 PM, Johannes Schindelin wrote:
> Hi,
>
> On Mon, 22 Aug 2005, Jeff Carr wrote:
>
>
>>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.
>
>
> This is why your original target (when you clone) is stored as "origin".
OK. I rsync'ed the repository directly so a origin file wasn't created.
That explains that. So my small "feature" request reduces to adding
something like this to git-pull-script. Thanks, Jeff
diff --git a/git-pull-script b/git-pull-script
--- a/git-pull-script
+++ b/git-pull-script
@@ -1,10 +1,20 @@
#!/bin/sh
#
+ORIGIN="$@"
+
+if [ ! $ORIGIN ]
+then
+ if [ -f .git/branches/origin ]
+ then
+ ORIGIN=`cat .git/branches/origin`
+ fi
+fi
+
. git-sh-setup-script || die "Not a git archive"
-. git-parse-remote "$@"
+. git-parse-remote "$ORIGIN"
merge_name="$_remote_name"
-git-fetch-script "$@" || exit 1
+git-fetch-script "$ORIGIN" || exit 1
git-resolve-script \
"$(cat "$GIT_DIR"/HEAD)" \
next prev parent reply other threads:[~2005-08-23 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=430A7FE6.4010801@linuxmachines.com \
--to=jcarr@linuxmachines.com \
--cc=Johannes.Schindelin@gmx.de \
--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).