git-2.22.0/exec-cmd.c
/*
 * Resolves the executable path by querying Darwin application stack.
 *
 * Returns 0 on success, -1 on failure.
 */
Resolves the executable path by querying Darwin application stack.
Returns 0 on success, -1 on failure.
Resolves the executable path by querying Darwin application stack . Returns 0 on success - 1 on failure .
static int git_get_exec_path_darwin(struct strbuf *buf)
{
	char path[PATH_MAX];
	uint32_t size = sizeof(path);
	if (!_NSGetExecutablePath(path, &size)) {
		trace_printf(
			"trace: resolved executable path from Darwin stack: %s\n",
			path);
		strbuf_addstr(buf, path);
		return 0;
	}
	return -1;
}
static int git_get_exec_path_darwin ( struct strbuf * buf ) { char path [ PATH_MAX ] ; uint32_t size = sizeof ( path ) ; if ( ! _NSGetExecutablePath ( path , & size ) ) { trace_printf ( " \n " , path ) ; strbuf_addstr ( buf , path ) ; return 0 ; } return -1 ; }
Resolves the executable path by querying Darwin application stack.
Resolves the executable path by querying Darwin application stack .