remove match_pathspec() in favor of match_pathspec_depth()
[gitweb.git] / builtin / commit.c
index d34baaba0e735bb89be60407d8dce0f67f8115d2..4ee9ba6c63857de0689947ab51a7bcbc95b33259 100644 (file)
@@ -199,7 +199,7 @@ static int list_paths(struct string_list *list, const char *with_tree,
        m = xcalloc(1, pattern->nr);
 
        if (with_tree) {
-               char *max_prefix = common_prefix(pattern->raw);
+               char *max_prefix = common_prefix(pattern);
                overlay_tree_on_cache(with_tree, max_prefix ? max_prefix : prefix);
                free(max_prefix);
        }
@@ -336,7 +336,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
         */
        if (all || (also && pathspec.nr)) {
                fd = hold_locked_index(&index_lock, 1);
-               add_files_to_cache(also ? prefix : NULL, pathspec.raw, 0);
+               add_files_to_cache(also ? prefix : NULL, &pathspec, 0);
                refresh_cache_or_die(refresh_flags);
                update_main_cache_tree(WRITE_TREE_SILENT);
                if (write_cache(fd, active_cache, active_nr) ||