- const char *match = NULL;
-
- if (!prefixcmp(message, "checkout: moving to "))
- match = message + strlen("checkout: moving to ");
- else if (!prefixcmp(message, "checkout: moving from ")) {
- const char *cp = message + strlen("checkout: moving from ");
- if ((cp = strstr(cp, " to ")) != NULL) {
- match = cp + 4;
- }
+ const char *match = NULL, *target = NULL;
+ size_t len;
+
+ if (!prefixcmp(message, "checkout: moving from ")) {
+ match = message + strlen("checkout: moving from ");
+ if ((target = strstr(match, " to ")) != NULL)
+ target += 4;