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

Re: [PATCH] Windows: set gitexecdir = $(bindir)

From
Johannes Sixt <johannes.sixt@telecom.at>
Date
Jul 19, 2008, 19:31 UTC
Message-ID
<200807192131.44441.johannes.sixt@telecom.at>
In-Reply-To
<7vmykd238a.fsf@gitster.siamese.dyndns.org>
On Samstag, 19. Juli 2008, Junio C Hamano wrote:
Show 24 quoted lines
> Johannes Sixt <johannes.sixt@telecom.at> writes:
> > Take as an example 'git pull'.
> >
> > - The first call to git will derive the exec-path
> > $prefix/bin/../libexec/git-core and prepend it to $PATH.
> >
> > - Calls to builtin git commands from inside 'git pull' will then derive
> > the exec-path $prefix/bin/../libexec/git-core/../libexec/git-core, that
> > is $prefix/libexec/libexec/git-core, and prepend it to $PATH as well.
> > That directory does not exist - usually - and it does not hurt. But it
> > feels dirty and potentially dangerous.
>
> You run "git" with an argument "pull".  It needs to figure out where
> "git-pull" is, it checks where it came from and adds ../libexec/git-core/.
> Then it runs "git-pull" script.
>
> Then the script may have a call to "git ls-files -u" or "git-merge".
>
>  - The former case, "git" again needs to find out where "git-ls-files"
>    is.
>
>    If "git" is found as bin/git and not as libexec/git-core/git, this
>    should be perfectly fine, isn't it?  Perhaps we install a duplicate
>    copy there by mistake, which is what we need to fix?

Yes, there's libexec/git-core/git. There reason might be that the install target is simpler to write (to create the hardlinks) just in case $(bindir) and $(gitexecdir) are not on the same mount.

Show 7 quoted lines
>  - The latter case (our scripts source git-sh-setup so they have libexec
>    one in the PATH when they are started) would find "git-merge" directly
>    and runs it.
>
> In either case, the programs "git-ls-files" and "git-merge" do not need to
> do the same discovery -- are we giving them enough clues when we run them
> to let them avoid that?
Probably the only clue is the name itself, like Steffen proposed.
I'll see how I can improve my earlier exec-path patch series.
-- Hannes
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 16 in “Windows related patches”
  1. Windows related patchesJohannes Sixt, Jul 18, 2008
  2. Teach lookup_prog not to select directoriesJohannes Sixt, Jul 18, 2008
  3. builtin-clone: Use is_dir_sep() instead of '/'Johannes Sixt, Jul 18, 2008
  4. Add ANSI control code emulation for the Windows consoleJohannes Sixt, Jul 18, 2008
  5. Windows: set gitexecdir = $(bindir)Johannes Sixt, Jul 18, 2008
  6. Junio C HamanoJul 19, 2008
  7. Johannes SixtJul 19, 2008
  8. Steffen ProhaskaJul 19, 2008
  9. Junio C HamanoJul 19, 2008
  10. Johannes SixtJul 19, 2008
  11. Junio C HamanoJul 19, 2008
  12. Johannes SixtJul 19, 2008
  13. Johannes SchindelinJul 19, 2008
  14. Johannes SixtJul 19, 2008
  15. Daniel BarkalowJul 19, 2008
  16. Kristian HøgsbergJul 21, 2008

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.