-static int walk_tree(const unsigned char *sha1, const char *base,int baselen,
- const char *pathname, unsigned mode, int stage, void *cbdata) {
- if(strncmp(base,match_path,baselen)
- || strcmp(match_path+baselen,pathname) )
+static int walk_tree(const unsigned char *sha1, const char *base, int baselen,
+ const char *pathname, unsigned mode, int stage, void *cbdata)
+{
+ struct walk_tree_context *walk_tree_ctx = cbdata;
+
+ if (strncmp(base, walk_tree_ctx->match_path, baselen)
+ || strcmp(walk_tree_ctx->match_path + baselen, pathname))