transport-helper: ask the helper to set progress and verbosity options after asking for its capabilities
[gitweb.git] / shell.c
diff --git a/shell.c b/shell.c
index 66350b220cc74abd383e10770f8325ba4e658e87..ace62e4b6503d821962242f9cf3bd9af22bc39b9 100644 (file)
--- a/shell.c
+++ b/shell.c
@@ -15,7 +15,7 @@ static int do_generic_cmd(const char *me, char *arg)
        setup_path();
        if (!arg || !(arg = sq_dequote(arg)))
                die("bad argument");
-       if (prefixcmp(me, "git-"))
+       if (!starts_with(me, "git-"))
                die("bad command");
 
        my_argv[0] = me + 4;
@@ -46,11 +46,7 @@ static int is_valid_cmd_name(const char *cmd)
 
 static char *make_cmd(const char *prog)
 {
-       char *prefix = xmalloc((strlen(prog) + strlen(COMMAND_DIR) + 2));
-       strcpy(prefix, COMMAND_DIR);
-       strcat(prefix, "/");
-       strcat(prefix, prog);
-       return prefix;
+       return xstrfmt("%s/%s", COMMAND_DIR, prog);
 }
 
 static void cd_to_homedir(void)