Re: [PATCH] Extend runtime prefix computation

2016-04-20 Thread Michael Weiser
Hi, On Fri, Apr 15, 2016 at 09:43:29AM -0700, Junio C Hamano wrote: > We tend to avoid system specific includes in individual *.c files. > Perhaps implement platform specific bits in compat/? E.g. each > platform specific file in compat/ may implement and export the same >

Re: [PATCH] Extend runtime prefix computation

2016-04-18 Thread Johannes Schindelin
Hi Junio, On Fri, 15 Apr 2016, Junio C Hamano wrote: > Michael Weiser writes: > > > Make git fully relocatable at runtime extending the runtime prefix > > calculation. Handle absolute and relative paths in argv0. Handle no path > > at all in argv0 in a system-specific

Re: [PATCH] Extend runtime prefix computation

2016-04-15 Thread Junio C Hamano
Michael Weiser writes: > Make git fully relocatable at runtime extending the runtime prefix > calculation. Handle absolute and relative paths in argv0. Handle no path > at all in argv0 in a system-specific manner. Replace assertions with > initialised variables and checks

[PATCH] Extend runtime prefix computation

2016-04-15 Thread Michael Weiser
Make git fully relocatable at runtime extending the runtime prefix calculation. Handle absolute and relative paths in argv0. Handle no path at all in argv0 in a system-specific manner. Replace assertions with initialised variables and checks that lead to fallback to the static prefix. --- Notes:

Re: [PATCH] Extend runtime prefix computation

2013-10-04 Thread Michael Weiser
Hi, On Wed, Apr 17, 2013 at 08:06:47AM +0200, Michael Weiser wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). What's the reason you want it on other platforms? It's part of an in-house

Re: [PATCH] Extend runtime prefix computation

2013-04-17 Thread Michael Weiser
Hello Erik, On Tue, Apr 16, 2013 at 05:18:49PM +0200, Erik Faye-Lund wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). I think the motivation for the feature in the first place is Windows, where the

Re: [PATCH] Extend runtime prefix computation

2013-04-16 Thread Michael Weiser
Hello Junio, Hello list, On Wed, Mar 06, 2013 at 09:19:42AM +0100, Michael Weiser wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). The default for any change is not to include it. Is there any

Re: [PATCH] Extend runtime prefix computation

2013-04-16 Thread Erik Faye-Lund
On Wed, Mar 6, 2013 at 9:19 AM, Michael Weiser m.wei...@science-computing.de wrote: Hello Junio, On Tue, Mar 05, 2013 at 08:13:50AM -0800, Junio C Hamano wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path).

Re: [PATCH] Extend runtime prefix computation

2013-04-16 Thread Junio C Hamano
nobody writes: Hello Junio, Hello list, On Wed, Mar 06, 2013 at 09:19:42AM +0100, Michael Weiser wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). The default for any change is not to include it.

Re: [PATCH] Extend runtime prefix computation

2013-03-06 Thread Michael Weiser
Hello Junio, On Tue, Mar 05, 2013 at 08:13:50AM -0800, Junio C Hamano wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). The default for any change is not to include it. Is there any reason why we want

Re: [PATCH] Extend runtime prefix computation

2013-03-05 Thread Michael Weiser
Hello, On Tue, Nov 27, 2012 at 05:30:04PM +0100, Michael Weiser wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). Implement fallback to compiled-in prefix if determination fails or is impossible. I see

Re: [PATCH] Extend runtime prefix computation

2013-03-05 Thread Junio C Hamano
Michael Weiser m.wei...@science-computing.de writes: On Tue, Nov 27, 2012 at 05:30:04PM +0100, Michael Weiser wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). Implement fallback to compiled-in prefix if

Re: [PATCH] Extend runtime prefix computation

2012-11-30 Thread Erik Faye-Lund
On Tue, Nov 27, 2012 at 5:30 PM, Michael Weiser m.wei...@science-computing.de wrote: Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). Implement fallback to compiled-in prefix if determination fails or is

Re: [PATCH] Extend runtime prefix computation

2012-11-30 Thread Michael Weiser
Hello Erik, On Fri, Nov 30, 2012 at 11:20:52AM +0100, Erik Faye-Lund wrote: +#if defined(__linux__) + struct stat st; + if (!stat(/proc/self/exe, st)) { + abs_argv0 = xstrdup(real_path(/proc/self/exe)); + } +#elif

[PATCH] Extend runtime prefix computation

2012-11-27 Thread Michael Weiser
Support determining the binaries' installation path at runtime even if called without any path components (i.e. via search path). Implement fallback to compiled-in prefix if determination fails or is impossible. Signed-off-by: Michael Weiser wei...@science-computing.de --- - Has two very minor