summaryrefslogtreecommitdiff
path: root/builtin/ls-files.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-26 18:57:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-26 18:57:13 (GMT)
commit574ee8ae8636ffad8146e0f8e648b866dad725e6 (patch)
tree803d6e2645e3a8cc2491177f7be4fbf602af8cca /builtin/ls-files.c
parentbca181109d6f054d525c71a84963bbdc1f0c40bf (diff)
parent777c55a61615837d4391facd75cf334b96635801 (diff)
downloadgit-574ee8ae8636ffad8146e0f8e648b866dad725e6.zip
git-574ee8ae8636ffad8146e0f8e648b866dad725e6.tar.gz
git-574ee8ae8636ffad8146e0f8e648b866dad725e6.tar.bz2
Merge branch 'jc/report-path-error-to-dir'
Code clean-up. * jc/report-path-error-to-dir: report_path_error(): move to dir.c
Diffstat (limited to 'builtin/ls-files.c')
-rw-r--r--builtin/ls-files.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 914054d..6fa2205 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -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