Re: [PATCH 0/9] Make gitexecdir relative to $(bindir) on Windows
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 21, 2008, 23:45 UTC
- Message-ID
- <alpine.DEB.1.00.0807220140170.3407@eeepc-johanness>
- In-Reply-To
- <1216667998-8879-1-git-send-email-johannes.sixt@telecom.at>
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