commit 03ef88da8a05445e62b2d5afe4330cecea4ec25b
Author: Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
Date:   Tue Apr 28 20:36:52 2009 +0200

    Improve hash search performance
    
    g_str_has_prefix is forcibly better than strncmp+strlen (key array read twice).

diff --git a/gitg/gitg-window.c b/gitg/gitg-window.c
index 1da4088..2796cba 100644
--- a/gitg/gitg-window.c
+++ b/gitg/gitg-window.c
@@ -212,7 +212,7 @@ search_hash_equal_func(GtkTreeModel *model, gchar const *key, GtkTreeIter *iter)
 	
 	gchar *sha = gitg_revision_get_sha1(rv);
 	
-	gboolean ret = strncmp(sha, key, strlen(key)) != 0;
+	gboolean ret = !g_str_has_prefix(sha, key);
 	
 	g_free(sha);
 	gitg_revision_unref(rv);
