Merge branch 'jk/rebase-quiet-noop' into maint
[gitweb.git] / builtin / ls-files.c
index 914054d36734ba1b98c924aa640e748dced8b9fa..6fa2205734e435c9db787193dcf8c0392d9d2a24 100644 (file)
@@ -354,49 +354,6 @@ void overlay_tree_on_cache(const char *tree_name, const char *prefix)
        }
 }
 
-int report_path_error(const char *ps_matched,
-                     const struct pathspec *pathspec,
-                     const char *prefix)
-{
-       /*
-        * Make sure all pathspec matched; otherwise it is an error.
-        */
-       struct strbuf sb = STRBUF_INIT;
-       int num, errors = 0;
-       for (num = 0; num < pathspec->nr; num++) {
-               int other, found_dup;
-
-               if (ps_matched[num])
-                       continue;
-               /*
-                * The caller might have fed identical pathspec
-                * twice.  Do not barf on such a mistake.
-                * FIXME: parse_pathspec should have eliminated
-                * duplicate pathspec.
-                */
-               for (found_dup = other = 0;
-                    !found_dup && other < pathspec->nr;
-                    other++) {
-                       if (other == num || !ps_matched[other])
-                               continue;
-                       if (!strcmp(pathspec->items[other].original,
-                                   pathspec->items[num].original))
-                               /*
-                                * Ok, we have a match already.
-                                */
-                               found_dup = 1;
-               }
-               if (found_dup)
-                       continue;
-
-               error("pathspec '%s' did not match any file(s) known to git.",
-                     pathspec->items[num].original);
-               errors++;
-       }
-       strbuf_release(&sb);
-       return errors;
-}
-
 static const char * const ls_files_usage[] = {
        N_("git ls-files [<options>] [<file>...]"),
        NULL