Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- git.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/git.c b/git.c index cb5208d..f077f49 100644 --- a/git.c +++ b/git.c @@ -54,7 +54,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) /* * Check remaining flags. */ - if (!prefixcmp(cmd, "--exec-path")) { + if (has_prefix(cmd, "--exec-path")) { cmd += 11; if (*cmd == '=') git_set_argv_exec_path(cmd + 1); @@ -92,7 +92,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) *envchanged = 1; (*argv)++; (*argc)--; - } else if (!prefixcmp(cmd, "--git-dir=")) { + } else if (has_prefix(cmd, "--git-dir=")) { setenv(GIT_DIR_ENVIRONMENT, cmd + 10, 1); if (envchanged) *envchanged = 1; @@ -106,7 +106,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) *envchanged = 1; (*argv)++; (*argc)--; - } else if (!prefixcmp(cmd, "--namespace=")) { + } else if (has_prefix(cmd, "--namespace=")) { setenv(GIT_NAMESPACE_ENVIRONMENT, cmd + 12, 1); if (envchanged) *envchanged = 1; @@ -120,7 +120,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) *envchanged = 1; (*argv)++; (*argc)--; - } else if (!prefixcmp(cmd, "--work-tree=")) { + } else if (has_prefix(cmd, "--work-tree=")) { setenv(GIT_WORK_TREE_ENVIRONMENT, cmd + 12, 1); if (envchanged) *envchanged = 1; @@ -569,7 +569,7 @@ int main(int argc, char **av) * So we just directly call the internal command handler, and * die if that one cannot handle it. */ - if (!prefixcmp(cmd, "git-")) { + if (has_prefix(cmd, "git-")) { cmd += 4; argv[0] = cmd; handle_internal_command(argc, argv); @@ -581,7 +581,7 @@ int main(int argc, char **av) argc--; handle_options(&argv, &argc, NULL); if (argc > 0) { - if (!prefixcmp(argv[0], "--")) + if (has_prefix(argv[0], "--")) argv[0] += 2; } else { /* The user didn't specify a command; give them help */ -- 1.8.4.1.566.geca833c -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html