X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-show-branch.c;h=c892f1f7a643b3d7e5c298837424a72cbc2c4f78;hb=40250af411f33afa0c39a5d461829b676453ce3b;hp=402a8f79300eced54cf4024b8d10f4fd766996a1;hpb=599065a3bb94ae9f48e3808b8fafc8443017af28;p=git.git diff --git a/builtin-show-branch.c b/builtin-show-branch.c index 402a8f793..c892f1f7a 100644 --- a/builtin-show-branch.c +++ b/builtin-show-branch.c @@ -378,7 +378,7 @@ static int append_head_ref(const char *refname, const unsigned char *sha1, int f { unsigned char tmp[20]; int ofs = 11; - if (strncmp(refname, "refs/heads/", ofs)) + if (prefixcmp(refname, "refs/heads/")) return 0; /* If both heads/foo and tags/foo exists, get_sha1 would * get confused. @@ -392,7 +392,7 @@ static int append_remote_ref(const char *refname, const unsigned char *sha1, int { unsigned char tmp[20]; int ofs = 13; - if (strncmp(refname, "refs/remotes/", ofs)) + if (prefixcmp(refname, "refs/remotes/")) return 0; /* If both heads/foo and tags/foo exists, get_sha1 would * get confused. @@ -721,7 +721,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix) } for (i = 0; i < reflog; i++) { - char *logmsg, *msg, *m; + char *logmsg, *m; + const char *msg; unsigned long timestamp; int tz;