]> git.ipfire.org Git - thirdparty/git.git/blobdiff - run-command.c
t5411: add basic test cases for proc-receive hook
[thirdparty/git.git] / run-command.c
index f5e1149f9b395e77c3d55a147332c1117746d7b1..0f41af3b550f1f58d89f496b539e44f28559fbf6 100644 (file)
@@ -421,12 +421,12 @@ static int prepare_cmd(struct argv_array *out, const struct child_process *cmd)
        }
 
        /*
-        * If there are no '/' characters in the command then perform a path
-        * lookup and use the resolved path as the command to exec.  If there
-        * are '/' characters, we have exec attempt to invoke the command
-        * directly.
+        * If there are no dir separator characters in the command then perform
+        * a path lookup and use the resolved path as the command to exec. If
+        * there are dir separator characters, we have exec attempt to invoke
+        * the command directly.
         */
-       if (!strchr(out->argv[1], '/')) {
+       if (!has_dir_sep(out->argv[1])) {
                char *program = locate_in_PATH(out->argv[1]);
                if (program) {
                        free((char *)out->argv[1]);