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

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

From
Steffen Prohaska <prohaska@zib.de>
Date
Jul 19, 2008, 17:10 UTC
Message-ID
<9B346ED9-DAD8-4CC7-A1B5-0230ACA358BA@zib.de>
In-Reply-To
<200807191052.20057.johannes.sixt@telecom.at>
On Jul 19, 2008, at 10:52 AM, Johannes Sixt wrote:
Show 34 quoted lines
> On Samstag, 19. Juli 2008, Junio C Hamano wrote:
>> Sorry, I am not sure if I understand what you are trying to solve.   
>> If you
>> have ../libexec/git-core/ in GIT_EXEC_PATH (or have  
>> builtin_exec_path()
>> use it), then your installation would look like this:
>>
>> 	[[some random place]]
>>        	bin/git
>>                libexec/git-core/git-add
>>                libexec/git-core/git-del
>>                libexec/git-core/git-dir
>>                ...
>>
>> and if "git" can figure out it is "[[some random place]]/bin/git",
>> it can find its subcommands from neighbouring directory, that is  
>> still
>> inside the random place the user told the installer to use, can't it?
>
> Yes, but...
>
> 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.

Maybe we can avoid this based on the name of the executable? We would add libexec only if the executable is named "git", but not if it is one of the dashed forms "git-*".

	Steffen
Previous: Johannes SixtNext: Junio C Hamano
Message 8 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.