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