]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/remote.c
refactor skip_prefix to return a boolean
[thirdparty/git.git] / builtin / remote.c
index c9102e8fe94b41af5136a9cc23db939effae147a..a8efe3da4d7dad3b17582c91671f0f475d54a9ac 100644 (file)
@@ -250,9 +250,7 @@ static struct string_list branch_list;
 
 static const char *abbrev_ref(const char *name, const char *prefix)
 {
-       const char *abbrev = skip_prefix(name, prefix);
-       if (abbrev)
-               return abbrev;
+       skip_prefix(name, prefix, &name);
        return name;
 }
 #define abbrev_branch(name) abbrev_ref((name), "refs/heads/")