git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git 2.9.2: is RUNTIME_PREFIX supposed to work?

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2016, 16:37 UTC
Message-ID
<xmqq8tudqoxm.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqh991qpyn.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> Paul Smith <paul@mad-scientist.net> writes:
>
>> On Mon, 2016-09-26 at 14:57 -0700, Junio C Hamano wrote:
>>> On Mon, Sep 26, 2016 at 2:32 PM, Paul Smith <paul@mad-scientist.net> wrote:
>>> > 
>>> > Hi all.  I'm trying to create a relocatable installation of Git 2.9.2,
>>> > so I can copy it anywhere and it continues to run without any problem.
>>> > This is on GNU/Linux systems, FWIW.
>>> 
>>> I had an impression that the setting was only to support MS Windows.
>>
>> Hm.  You may be right.  If so that's too bad, because a relocatable Git
>> is very handy even on UNIX systems.  Is there a reason for invoking the
>> subcommands by providing the plain command ("fetch", "merge-base") as
>> argv[0], rather than giving the fully-qualified path to a Git command?
>
> I do not think of any reason offhand. It just is that we never
> needed it.

If you are talking about invoking "git-fetch", then there is a very good reason. Built-in's do not need any actual binary on the filesystem (they only need "git").

But that does not have any relevance to the part below.
Show 5 quoted lines
> If you want to add support without making the resulting codebase too
> ugly, without breaking the classic way of installing into a fixed
> locations, and without breaking the existing support of platforms
> that does know the runtime-prefix thing, not just I wouldn't mind
> but I would welcome such an addition ;-)

If you can make runtime-prefix honored on more platforms, that would be good, though you _might_ have just added another "without" to the above list: without using full paths e.g. /usr/local/git/bin/git-fetch unconditionally.

Previous: Junio C Hamano
Message 6 of 6 in “git 2.9.2: is RUNTIME_PREFIX supposed to work?”
  1. Paul SmithSep 26, 2016
  2. Junio C HamanoSep 26, 2016
  3. Paul SmithSep 27, 2016
  4. Johannes SchindelinSep 27, 2016
  5. Junio C HamanoSep 27, 2016
  6. Junio C HamanoSep 27, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.