fix bug
diff --git a/src/backend.c b/src/backend.c
index 0186768..0a97b64 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -219,7 +219,7 @@
 	while ((end - start) > 1 && *(end-1) == '/')
 		end--;
 	//get rid of trailing ".git"
-	if ((end - start) > 4 && strcmp(end-4, ".git") == 0)
+	if ((end - start) > 4 && strncmp(end-4, ".git", 4) == 0)
 		end -= 4;
 
 	hash = gen_hash(px, start, (end - start));