Merge branch 'ma/locate-in-path-for-windows' into next

"git bisect visualize" stopped running "gitk" on Git for Windows
when the command was reimplemented in C around Git 2.34 timeframe.
This has been corrected.

* ma/locate-in-path-for-windows:
  docs: update when `git bisect visualize` uses `gitk`
  compat/mingw: implement a native locate_in_PATH()
  run-command: conditionally define locate_in_PATH()
This commit is contained in:
Junio C Hamano
2023-08-06 17:15:11 -07:00
4 changed files with 18 additions and 3 deletions

View File

@ -170,6 +170,7 @@ int is_executable(const char *name)
return st.st_mode & S_IXUSR;
}
#ifndef locate_in_PATH
/*
* Search $PATH for a command. This emulates the path search that
* execvp would perform, without actually executing the command so it
@ -218,6 +219,7 @@ static char *locate_in_PATH(const char *file)
strbuf_release(&buf);
return NULL;
}
#endif
int exists_in_PATH(const char *command)
{