diff options
author | Brandon Williams <bmwill@google.com> | 2017-01-27 18:02:05 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-02-01 13:46:53 -0800 |
commit | dc81cf377cd25193a9cf044767917e4f5553c285 (patch) | |
tree | c5e941a96229ac5a008b3d538e809f89dbc51093 /compat/strdup.c | |
parent | attr: tighten const correctness with git_attr and match_attr (diff) | |
download | tgif-dc81cf377cd25193a9cf044767917e4f5553c285.tar.xz |
attr: store attribute stack in attr_check structure
The last big hurdle towards a thread-safe API for the attribute system
is the reliance on a global attribute stack that is modified during each
call into the attribute system.
This patch removes this global stack and instead a stack is stored
locally in each attr_check instance. This opens up the opportunity for
future optimizations to customize the attribute stack for the attributes
that a particular attr_check struct is interested in.
One caveat with pushing the attribute stack into the attr_check
structure is that the attribute system now needs to keep track of all
active attr_check instances. Due to the direction mechanism the stack
needs to be dropped when the direction is switched. In order to ensure
correctness when the direction is changed the attribute system needs to
iterate through all active attr_check instances and drop each of their
stacks.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/strdup.c')
0 files changed, 0 insertions, 0 deletions