git-commit: partial commit of paths only removed from the index
[gitweb.git] / tree-walk.h
index ee747aba0bec914bd8f5c7a5285c8395ba5f489b..db0fbdc701f1ef63cdc1a8b7d5c5e72322f91426 100644 (file)
@@ -22,7 +22,7 @@ static inline const unsigned char *tree_entry_extract(struct tree_desc *desc, co
 
 static inline int tree_entry_len(const char *name, const unsigned char *sha1)
 {
-       return (char *)sha1 - (char *)name - 1;
+       return (const char *)sha1 - name - 1;
 }
 
 void update_tree_entry(struct tree_desc *);