summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-24 21:12:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-24 21:12:10 (GMT)
commit777c55a61615837d4391facd75cf334b96635801 (patch)
tree5c5a3afc4249a24acbb6ea76cb72e53057ce6954 /cache.h
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-777c55a61615837d4391facd75cf334b96635801.zip
git-777c55a61615837d4391facd75cf334b96635801.tar.gz
git-777c55a61615837d4391facd75cf334b96635801.tar.bz2
report_path_error(): move to dir.c
The expected call sequence is for the caller to use match_pathspec() repeatedly on a set of pathspecs, accumulating the "hits" in a separate array, and then call this function to diagnose a pathspec that never matched anything, as that can indicate a typo from the command line, e.g. "git commit Maekfile". Many builtin commands use this function from builtin/ls-files.c, which is not a very healthy arrangement. ls-files might have been the first command to feel the need for such a helper, but the need is shared by everybody who uses the "match and then report" pattern. Move it to dir.c where match_pathspec() is defined. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index f23fdbe..8ec0b65 100644
--- a/cache.h
+++ b/cache.h
@@ -1411,7 +1411,6 @@ extern int ws_blank_line(const char *line, int len, unsigned ws_rule);
#define ws_tab_width(rule) ((rule) & WS_TAB_WIDTH_MASK)
/* ls-files */
-int report_path_error(const char *ps_matched, const struct pathspec *pathspec, const char *prefix);
void overlay_tree_on_cache(const char *tree_name, const char *prefix);
char *alias_lookup(const char *alias);