system_path(): simplify using strip_path_suffix(), and add suffix "git"
commit024aa7d8d5114f76e616a0ed8ddcf3b463ff2c14
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 19 Feb 2009 19:10:53 +0000 (19 20:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Feb 2009 06:47:39 +0000 (19 22:47 -0800)
tree5be882a523e0185a8114e44689469d85ffa3eca9
parent4fcc86b07db26da17f17af0fd777cab78fcaaf4c
system_path(): simplify using strip_path_suffix(), and add suffix "git"

At least for the author of this patch, the logic in system_path() was
too hard to understand.  Using the function strip_path_suffix() documents
the idea of the code better.

The real change is to add the suffix "git", so that a runtime prefix will
be computed correctly even when the executable was called in /git/ as is
the case in msysGit (Windows insists to search the current directory
before the PATH when looking for an executable).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
exec_cmd.c