mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
Use is_absolute_path() in more places.
This commit is contained in:
14
git.c
14
git.c
@@ -422,22 +422,16 @@ int main(int argc, const char **argv)
|
||||
* if it's an absolute path and we don't have
|
||||
* anything better.
|
||||
*/
|
||||
if (slash) {
|
||||
*slash++ = 0;
|
||||
if (*cmd == '/')
|
||||
exec_path = cmd;
|
||||
cmd = slash;
|
||||
}
|
||||
|
||||
#ifdef __MINGW32__
|
||||
slash = strrchr(cmd, '\\');
|
||||
if (!slash)
|
||||
slash = strrchr(cmd, '\\');
|
||||
#endif
|
||||
if (slash) {
|
||||
*slash++ = 0;
|
||||
if (cmd[1] == ':')
|
||||
if (is_absolute_path(cmd))
|
||||
exec_path = cmd;
|
||||
cmd = slash;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "git-xxxx" is the same as "git xxxx", but we obviously:
|
||||
|
||||
Reference in New Issue
Block a user