update-index: fix segfault with missing --cacheinfo argument
[gitweb.git] / revision.c
index 61be08754af91a32f9c7729f2e5223c592faf451..78b5c3ac0b2d7d436b35a69a3cf6c1b023c96dd5 100644 (file)
@@ -774,6 +774,10 @@ static int add_parents_to_list(struct rev_info *revs, struct commit *commit,
                return 0;
        commit->object.flags |= ADDED;
 
+       if (revs->include_check &&
+           !revs->include_check(commit, revs->include_check_data))
+               return 0;
+
        /*
         * If the commit is uninteresting, don't try to
         * prune parents - we want the maximal uninteresting
@@ -1182,7 +1186,7 @@ int ref_excluded(struct string_list *ref_excludes, const char *path)
        if (!ref_excludes)
                return 0;
        for_each_string_list_item(item, ref_excludes) {
-               if (!fnmatch(item->string, path, 0))
+               if (!wildmatch(item->string, path, 0, NULL))
                        return 1;
        }
        return 0;