From 6f525e7100061fb0dbc2d9230cc9948c7c5b2978 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sun, 6 Jan 2013 16:58:08 +0000 Subject: add.c: move pathspec matchers into new pathspec.c for reuse Extract the following functions from builtin/add.c to pathspec.c, in preparation for reuse by a new git check-ignore command: - fill_pathspec_matches() - find_used_pathspec() The functions being extracted are not changed in any way, except removal of the 'static' qualifier. Also add comments documenting these newly public functions, including clarifications that they operate on the index. Signed-off-by: Adam Spiers Signed-off-by: Junio C Hamano --- pathspec.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pathspec.h (limited to 'pathspec.h') diff --git a/pathspec.h b/pathspec.h new file mode 100644 index 0000000000..1cb1909e4c --- /dev/null +++ b/pathspec.h @@ -0,0 +1,7 @@ +#ifndef PATHSPEC_H +#define PATHSPEC_H + +extern char *find_used_pathspec(const char **pathspec); +extern void fill_pathspec_matches(const char **pathspec, char *seen, int specs); + +#endif /* PATHSPEC_H */ -- cgit v1.2.1