Merge branch 'jk/complete-merge-base'
[gitweb.git] / builtin / update-ref.c
index 894f16bc59248f4c642228781a3b12bc1a82e54f..1292cfea11d87e8c98ba64ffae9d6a1aeffaca9f 100644 (file)
@@ -229,15 +229,15 @@ static void update_refs_stdin(void)
                        die("empty command in input");
                else if (isspace(*cmd.buf))
                        die("whitespace before command: %s", cmd.buf);
-               else if (!prefixcmp(cmd.buf, "update "))
+               else if (starts_with(cmd.buf, "update "))
                        parse_cmd_update(cmd.buf + 7);
-               else if (!prefixcmp(cmd.buf, "create "))
+               else if (starts_with(cmd.buf, "create "))
                        parse_cmd_create(cmd.buf + 7);
-               else if (!prefixcmp(cmd.buf, "delete "))
+               else if (starts_with(cmd.buf, "delete "))
                        parse_cmd_delete(cmd.buf + 7);
-               else if (!prefixcmp(cmd.buf, "verify "))
+               else if (starts_with(cmd.buf, "verify "))
                        parse_cmd_verify(cmd.buf + 7);
-               else if (!prefixcmp(cmd.buf, "option "))
+               else if (starts_with(cmd.buf, "option "))
                        parse_cmd_option(cmd.buf + 7);
                else
                        die("unknown command: %s", cmd.buf);
@@ -252,11 +252,11 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
        int delete = 0, no_deref = 0, read_stdin = 0, end_null = 0, flags = 0;
        struct option options[] = {
                OPT_STRING( 'm', NULL, &msg, N_("reason"), N_("reason of the update")),
-               OPT_BOOLEAN('d', NULL, &delete, N_("delete the reference")),
-               OPT_BOOLEAN('z', NULL, &end_null, N_("stdin has NUL-terminated arguments")),
-               OPT_BOOLEAN( 0 , "no-deref", &no_deref,
+               OPT_BOOL('d', NULL, &delete, N_("delete the reference")),
+               OPT_BOOL( 0 , "no-deref", &no_deref,
                                        N_("update <refname> not the one it points to")),
-               OPT_BOOLEAN( 0 , "stdin", &read_stdin, N_("read updates from stdin")),
+               OPT_BOOL('z', NULL, &end_null, N_("stdin has NUL-terminated arguments")),
+               OPT_BOOL( 0 , "stdin", &read_stdin, N_("read updates from stdin")),
                OPT_END(),
        };