1
0
mirror of https://github.com/git/git.git synced 2025-04-01 14:09:16 +00:00
Adam Spiers c082df2453 dir.c: use a single struct exclude_list per source of excludes
Previously each exclude_list could potentially contain patterns
from multiple sources.  For example dir->exclude_list[EXC_FILE]
would typically contain patterns from .git/info/exclude and
core.excludesfile, and dir->exclude_list[EXC_DIRS] could contain
patterns from multiple per-directory .gitignore files during
directory traversal (i.e. when dir->exclude_stack was more than
one item deep).

We split these composite exclude_lists up into three groups of
exclude_lists (EXC_CMDL / EXC_DIRS / EXC_FILE as before), so that each
exclude_list now contains patterns from a single source.  This will
allow us to cleanly track the origin of each pattern simply by adding
a src field to struct exclude_list, rather than to struct exclude,
which would make memory management of the source string tricky in the
EXC_DIRS case where its contents are dynamically generated.

Similarly, by moving the filebuf member from struct exclude_stack to
struct exclude_list, it allows us to track and subsequently free
memory buffers allocated during the parsing of all exclude files,
rather than only tracking buffers allocated for files in the EXC_DIRS
group.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-06 14:25:06 -08:00
..
2012-03-28 08:47:23 -07:00
2009-10-01 08:21:35 -04:00
2012-09-14 20:57:23 -07:00
2011-08-08 09:30:12 -07:00
2012-06-19 11:35:19 -07:00
2012-04-20 15:49:16 -07:00
2012-05-03 15:13:31 -07:00
2012-06-19 11:35:19 -07:00
2012-08-06 15:34:20 -07:00
2011-12-12 11:52:31 -08:00
2012-05-07 13:28:34 -07:00
2012-08-06 15:34:20 -07:00
2011-09-06 11:42:12 -07:00
2011-05-19 10:55:54 -07:00
2011-03-11 10:59:16 -05:00
2012-09-14 20:57:23 -07:00
2010-07-05 13:39:02 -07:00
2012-06-19 11:35:19 -07:00
2012-06-08 08:32:20 -07:00
2010-07-20 16:59:17 -07:00
2012-08-06 15:34:20 -07:00