Skip to content
  • Brandon Williams's avatar
    attr: store attribute stack in attr_check structure · dc81cf37
    Brandon Williams authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarBrandon Williams <bmwill@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    dc81cf37