Thread (89 messages) 89 messages, 3 authors, 2016-06-15

[PATCH 84/86] builtin/update-ref: replace prefixcmd() with has_prefix()

flat view
STALE3768d

From: Christian Couder <hidden>
Date: 2016-06-15 22:59:12
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Christian Couder <redacted>
---
 builtin/update-ref.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 702e90d..d81d959 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -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 (has_prefix(cmd.buf, "update "))
 			parse_cmd_update(cmd.buf + 7);
-		else if (!prefixcmp(cmd.buf, "create "))
+		else if (has_prefix(cmd.buf, "create "))
 			parse_cmd_create(cmd.buf + 7);
-		else if (!prefixcmp(cmd.buf, "delete "))
+		else if (has_prefix(cmd.buf, "delete "))
 			parse_cmd_delete(cmd.buf + 7);
-		else if (!prefixcmp(cmd.buf, "verify "))
+		else if (has_prefix(cmd.buf, "verify "))
 			parse_cmd_verify(cmd.buf + 7);
-		else if (!prefixcmp(cmd.buf, "option "))
+		else if (has_prefix(cmd.buf, "option "))
 			parse_cmd_option(cmd.buf + 7);
 		else
 			die("unknown command: %s", cmd.buf);
-- 
1.8.4.1.566.geca833c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help