Imported Upstream version 2.26.0
[platform/upstream/git.git] / refs / files-backend.c
index 0ea66a2..561c33a 100644 (file)
@@ -465,8 +465,7 @@ stat_ref:
        close(fd);
        strbuf_rtrim(&sb_contents);
        buf = sb_contents.buf;
-       if (starts_with(buf, "ref:")) {
-               buf += 4;
+       if (skip_prefix(buf, "ref:", &buf)) {
                while (isspace(*buf))
                        buf++;