summaryrefslogtreecommitdiff
path: root/pathspec.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-11-18 16:47:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-19 01:50:33 (GMT)
commit22af33bece7e121b9d535d0a117cd4553b00fe07 (patch)
treebe363db3dd0c2c63fc41762fd006df8ab77ef2be /pathspec.h
parent93e23798effba81df218157d97995771adc89668 (diff)
downloadgit-22af33bece7e121b9d535d0a117cd4553b00fe07.zip
git-22af33bece7e121b9d535d0a117cd4553b00fe07.tar.gz
git-22af33bece7e121b9d535d0a117cd4553b00fe07.tar.bz2
dir.c: move, rename and export match_attrs()
The function will be reused for matching attributes in pathspec when walking trees (currently it's used for matching pathspec when walking a list). pathspec.c would be a more neutral place for this. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pathspec.h')
-rw-r--r--pathspec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pathspec.h b/pathspec.h
index 5fd781d..1c18a2c 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -111,5 +111,8 @@ void add_pathspec_matches_against_index(const struct pathspec *pathspec,
char *seen);
char *find_pathspecs_matching_against_index(const struct pathspec *pathspec,
const struct index_state *istate);
+int match_pathspec_attrs(const struct index_state *istate,
+ const char *name, int namelen,
+ const struct pathspec_item *item);
#endif /* PATHSPEC_H */