Thread (19 messages) flat view 19 messages, 6 authors, 2016-06-15

Re: [PATCH 0/9] Make gitexecdir relative to $(bindir) on Windows

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:59

Hi,

On Mon, 21 Jul 2008, Johannes Sixt wrote:
The problem was that argv[0] does not have a path in certain cases.
Note that the same holds true for Linux when calling a program that is in 
the PATH:

-- snip --
#include <stdio.h>

int main(int argc, char **argv)
{
        printf("%s\n", argv[0]);
        return 0;
}
-- snap --

compiled and put into the PATH will output just what the user said, not 
the full path.

I imagine that the proper solution would be to rip out lookup_prog() and 
use it for non-Windows Git, too.  Unless you want to limit the usefulness 
of your patch series to Windows, that is.

In which case you could use lookup_prog() after unstatifying 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