git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Fundamental problem with relative system paths] [PATCH 2/2] run-command (Windows): Run dashless "git <cmd>"
@ 2008-07-29  5:15 Steffen Prohaska
  2008-07-29  5:19 ` [PATCH 2/2 v2] run-command (Windows): Run dashless "git <cmd>" (solves part of problem with system_path) Steffen Prohaska
  0 siblings, 1 reply; 10+ messages in thread
From: Steffen Prohaska @ 2008-07-29  5:15 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: git, Junio C Hamano, Johannes Schindelin, Shawn O. Pearce


On Jul 28, 2008, at 10:37 PM, Johannes Sixt wrote:

> Zitat von Steffen Prohaska <prohaska@zib.de>:
>
>> This might solve a fundamental problem we have with the
>> computation of system directories based on relative paths
>> in combination with the new gitexecpath 'libexec/git-core'.
>> The problem is that the program 'git' is hardlinked to
>> directories with different depth.  It is either used as
>> 'bin/git' (1 directory) or as 'libexec/git-core/git-*'
>> (2 directories).  Thus, using the same relative path
>> in system_path() yields different results when starting from the
>> two locations.  I recognized the problem because /etc/gitconfig
>> is no longer be read.
>>
>> The patch below might fix the problem by always calling 'bin/git'
>> for builtin commands.  The computation in system_path() would
>> always start from 'bin' and thus yields predictable results.  I
>> am not sure however if it fully solves the problem because other
>> code paths might run the dashed forms directly.
>
> This paragraph should go into the commit message.

I'll send an updated patch including a commit message defending
the change more offensively.


>> I think the only way to verify correctness would be to stop
>> installing the dashed forms for builtins.  If they were not
>> installed they could not be called.  The only entry point for all
>> builtins would be 'bin/git'.  I don't think we want to stop
>> installing the dashed forms right away.
>>
>> So what shall we do?
>
> Your patches make a lot of sense.

Unfortunately, I am sure that they do not solve the problem fully, even
if we removed the dashed forms completely.  I'll send a second patch  
that
modifies the Makefile to stop installing the BUILT_INS.  It might be
useful for debugging.

	Steffen

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-07-29 11:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <BF5B7CBE-ACA8-4D81-8FC0-8A7901205854@zib.de>
2008-07-29  5:17 ` [PATCH 2/2 v2] run-command (Windows): Run dashless "git <cmd>" (solves part of problem with system_path) Steffen Prohaska
2008-07-29  5:17   ` [FOR DEBUGGING] Stop installing BUILT_INS Steffen Prohaska
2008-07-29  5:24   ` [PATCH 2/2 v2] run-command (Windows): Run dashless "git <cmd>" (solves part of problem with system_path) Shawn O. Pearce
2008-07-29  5:42     ` Junio C Hamano
2008-07-29  5:55       ` Steffen Prohaska
2008-07-29 11:13         ` Johannes Schindelin
2008-07-29 11:31           ` Steffen Prohaska
2008-07-29  5:51     ` Steffen Prohaska
2008-07-29 11:18       ` Johannes Schindelin
2008-07-29  5:15 [Fundamental problem with relative system paths] [PATCH 2/2] run-command (Windows): Run dashless "git <cmd>" Steffen Prohaska
2008-07-29  5:19 ` [PATCH 2/2 v2] run-command (Windows): Run dashless "git <cmd>" (solves part of problem with system_path) Steffen Prohaska
2008-07-29  5:19   ` [FOR DEBUGGING] Stop installing BUILT_INS Steffen Prohaska

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).