git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: What's cooking in git.git
Date: Fri, 13 Jan 2006 19:45:05 -0800	[thread overview]
Message-ID: <7vvewnwjzy.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 7vhd8al3ae.fsf@assigned-by-dhcp.cox.net

Junio C Hamano <junkio@cox.net> writes:

>  - Exec git programs without using PATH (Michal Ostrowski).
>
>    This has been discussed for the last couple of days on the
>    list.  I think C side is ready to go in, but I'd like to
>    decide what to do on the scripting side before merging it
>    into the master branch.

I've done a minor fix in the Makefile (things were installed in
the wrong way around --- $bindir should hold git and gitk and
$gitexecdir should hold the rest), and ran a brief test after
installing things with gitexecdir set to /usr/lib/git-core/x.
gitk needs to be taught to use git --exec-path upfront to set
its own PATH, but other than that, everything looks peachy.

About prepending to/appending to/not touching PATH, my current
thinking is that prepending is the way to go.  The best
rationale so far I have heard against mucking with PATH was
"/home/mo/bin/diff vs /usr/bin/diff" issue, but I do not find
this to be so convincing in practice.  This "use my diff not
system diff" is done most often when system diff is not GNU
enough, but on such a machine git will not be installed under
/usr/bin anyway (after all git prefers GNU diff).

And this becomes truly a non-issue when you point $gitexecdir at
a separate location that holds *only* git stuff.  Everybody will
find the matching version of git that way, and when looking for
"diff", it will be found from one of the directories in the rest
of the PATH, not from $gitexecdir.

So unless there is an objection, this will graduate into the
"master" branch over the weekend.

What happens if gitexecdir != bindir?

As long as the user invokes "git foo" from the command line, not
"git-foo", everything should work fine, and once gitk is
updated, binary distributions could ship git with only git and
gitk in /usr/bin and others in /usr/lib/git-core/tools, or
something like that.

I will _not_ change the default gitexecdir in my Makefile nor
change the spec file, so RPM binary from kernel.org will still
have everything in /usr/bin for now.

Somebody needs to audit how ready popular Porcelains are, for at
least Cogito, stgit, gitweb and qgit and feed patches to
respective authors as necessary.  I haven't looked into any of
them about this issue.  The rules are:

    (1) you can assume "git" is available on PATH;

    (2) you should be safe if you do not use "git-foo" form;

    (3) you can run

        PATH="$(git --exec-path):$PATH"; export PATH

        once at the beginning of your program and use "git-foo"
        form.

Volunteers?

  reply	other threads:[~2006-01-14  3:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-12  0:04 What's cooking in git.git Junio C Hamano
2006-01-14  3:45 ` Junio C Hamano [this message]
2006-01-16 10:53 ` Petr Baudis
2006-12-13 21:38 Junio C Hamano
2015-08-05 22:55 Junio C Hamano
2015-08-05 23:14 ` David Turner
2015-08-05 23:58   ` Junio C Hamano
2015-08-07 16:40     ` Junio C Hamano
2015-08-06  4:55 ` Jeff King
2015-08-07 18:47   ` Junio C Hamano
2015-08-06 10:19 ` Johannes Schindelin

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=7vvewnwjzy.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --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).