From: Qingning Huo <qhuo@mayhq.co.uk>
To: Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] Invoke git-repo-config directly.
Date: Tue, 14 Mar 2006 22:40:27 +0000 [thread overview]
Message-ID: <20060314224027.GB14733@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0603141351470.3618@g5.osdl.org>
On Tue, Mar 14, 2006 at 01:58:09PM -0800, Linus Torvalds wrote:
>
>
> On Tue, 14 Mar 2006, Qingning Huo wrote:
> >
> > The system have GNU git installed at /usr/bin/git. I installed git-core
> > to ~/opt/bin. ~/opt/bin is in my PATH, but is after /usr/bin. I have
> > set alias git="$HOME/opt/bin/git".
>
> This should not be a problem with the modern "git.c" wrapper. It
> _should_, if you call it with the full path, automatically prepend that
> path to the PATH when executing sub-commands.
>
> So if you run git as "$HOME/opt/bin/git", the PATH _should_ be
> - first the "PREFIX/bin" path as defined by the build
> - second the "$HOME/opt/bin/" path as defined by the fact that you ran
> git from that path
> - finally the normal $PATH.
>
> To check this out, do this:
>
> ln -s /usr/bin/printenv ~/opt/bin/git-printenv
> git printenv
>
> and you should see the proper PATH that git ends up using internally that
> way.
>
> So your problem seems to be that you do "git-pull", when you really should
> do "git pull" (where that wrapper will set up PATH for you). Since you
> don't use the wrapper, the scripts end up doing the wrong thing.
>
Thanks for your detailed explanation. Yes, "git push" and "git pull"
both work fine out of the box. That is the good thing. But,
$ grep git git-pull.sh
. git-sh-setup
orig_head=$(git-rev-parse --verify HEAD) || die "Pulling into a black hole?"
git-fetch --update-head-ok "$@" || exit 1
curr_head=$(git-rev-parse --verify HEAD)
git-read-tree -u -m "$orig_head" "$curr_head" ||
var=`git repo-config --get pull.octopus`
var=`git repo-config --get pull.twohead`
merge_name=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD")
git-merge $no_summary $no_commit $strategy_args "$merge_name" HEAD $merge_head
We have "git-read-tree" and "git repo-config" at the same time. Are
there any rules saying which form should be preferred? How about pick
one form and stick to it?
If we uniformly call git helper programs/scripts with "git helper"
style, would git(1) append two paths to PATH everytime it is being
invoked? For example, "git pull" -> "git repo-config" would prepend
~/opt/bin four times to PATH. This wouldn't be very effecient.
Regards,
Qingning
next prev parent reply other threads:[~2006-03-14 22:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 21:10 [PATCH] Invoke git-repo-config directly Qingning Huo
2006-03-14 21:20 ` Johannes Schindelin
2006-03-14 21:30 ` Qingning Huo
2006-03-14 21:58 ` Linus Torvalds
2006-03-14 22:40 ` Qingning Huo [this message]
2006-03-14 23:07 ` Linus Torvalds
2006-03-15 20:40 ` Qingning Huo
2006-03-15 21:33 ` Junio C Hamano
2006-03-15 21:35 ` Junio C Hamano
2006-03-15 22:11 ` Qingning Huo
2006-03-15 22:51 ` Linus Torvalds
2006-03-15 23:35 ` Junio C Hamano
2006-03-16 7:53 ` Qingning Huo
2006-03-16 7:57 ` Junio C Hamano
2006-03-16 8:26 ` Junio C Hamano
2006-03-16 12:53 ` Mark Wooding
2006-03-16 13:53 ` Andreas Ericsson
2006-03-17 2:10 ` Junio C Hamano
2006-03-17 10:51 ` Mark Wooding
2006-03-16 14:27 ` Timo Hirvonen
2006-03-16 14:39 ` Andreas Ericsson
2006-03-16 20:33 ` Qingning Huo
2006-03-16 10:14 ` Junio C Hamano
2006-03-16 11:55 ` Andreas Ericsson
2006-03-16 19:27 ` Jon Loeliger
2006-03-16 19:32 ` Jon Loeliger
2006-03-16 6:37 ` 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=20060314224027.GB14733@localhost.localdomain \
--to=qhuo@mayhq.co.uk \
--cc=torvalds@osdl.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