system_path(): simplify using strip_path_suffix(), and add suffix "git"
commit047f0f01f21824cc925102ad4e8e623c4806e0aa
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 18 Feb 2009 14:41:37 +0000 (18 15:41 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 19 Feb 2009 20:13:53 +0000 (19 21:13 +0100)
tree792f8aa97a7e88c2bc82921b982425704431a05e
parentb824fc9cefb0317b98f6fc34c1192d409e859ea2
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>
exec_cmd.c