Hi, I have completed one of the microprojects -14th one: "Change 
fetch-pack.c:filter_refs() to use starts_with() instead of memcmp()." The only 
line in the function filter_refs() containing memcmp() is changed with 
starts_with(). I plan to apply for GSoC 2014. Any feedback is appreciated. 
Thanks. 
Signed-off-by: MustafaOrkunAcar <mustafaorkuna...@gmail.com>
---
 fetch-pack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index f061f1f..17823ab 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -506,7 +506,7 @@ static void filter_refs(struct fetch_pack_args *args,
                int keep = 0;
                next = ref->next;
 
-               if (!memcmp(ref->name, "refs/", 5) &&
+               if (starts_with(ref->name, "refs/") &&
                    check_refname_format(ref->name, 0))
                        ; /* trash */
                else {
-- 
1.9.1.286.g5172cb3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to