Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-16

Re: [PATCH] Extend runtime prefix computation

From: Johannes Schindelin <hidden>
Date: 2016-06-16 02:18:50

Hi Junio,

On Fri, 15 Apr 2016, Junio C Hamano wrote:
Michael Weiser [off-list ref] writes:
quoted
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.
That's a dense description of "what" without saying much about
"why".  Hint: start by describing what case(s) the current code
fails to find the correct runtime prefix.  That would give readers a
better understanding of what problem you are trying to solve.
I have to admit that I am really, *really* skeptical. To me, it looks like
this patch opens the door very wide to unintended consequences.
quoted
 #ifdef RUNTIME_PREFIX
-	assert(argv0_path);
-	assert(is_absolute_path(argv0_path));
Aren't these protecting against future and careless change that
forgets to call extract-argv0-path or make that function return
something that is not an absolute path?
This (first) assert() indeed saved me a couple of times from hunting for
bugs in the wrong place. Let's keep it.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help