summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2017-10-26 18:02:22 +0000
committerJunio C Hamano <gitster@pobox.com>2017-10-27 10:20:55 +0900
commit01cb7fa4c576b4f6e00797b900008086111d7f8e (patch)
tree8b667d2f50b5153679d9a9c7d2c35b5ce8927929 /dir.h
parent4e40fb302eacf4949f6b7d010fd5c11f1f652b7f (diff)
downloadgit-jh/dir-add-exclude-from-blob.tar.gz
dir: allow exclusions from blob in addition to filejh/dir-add-exclude-from-blob
Refactor add_excludes() to separate the reading of the exclude file into a buffer and the parsing of the buffer into exclude_list items. Add add_excludes_from_blob_to_list() to allow an exclude file be specified with an OID without assuming a local worktree or index exists. Refactor read_skip_worktree_file_from_index() and add do_read_blob() to eliminate duplication of preliminary processing of blob contents. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index e3717055d1..1bcf39123a 100644
--- a/dir.h
+++ b/dir.h
@@ -256,6 +256,9 @@ extern struct exclude_list *add_exclude_list(struct dir_struct *dir,
extern int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
struct exclude_list *el, struct index_state *istate);
extern void add_excludes_from_file(struct dir_struct *, const char *fname);
+extern int add_excludes_from_blob_to_list(struct object_id *oid,
+ const char *base, int baselen,
+ struct exclude_list *el);
extern void parse_exclude_pattern(const char **string, int *patternlen, unsigned *flags, int *nowildcardlen);
extern void add_exclude(const char *string, const char *base,
int baselen, struct exclude_list *el, int srcpos);