]> git.ipfire.org Git - thirdparty/git.git/commit - attr.c
attr: reformat git_attr_set_direction() function
authorBrandon Williams <bmwill@google.com>
Sat, 28 Jan 2017 02:02:07 +0000 (18:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Feb 2017 21:46:53 +0000 (13:46 -0800)
commitf0dd042148233ad4681b29f35f3bc3ba3b962474
treed748ff9b661d486df12146ee48e542359f2690a5
parent0787dafdccfb09b26501293f72db74638c3834ad
attr: reformat git_attr_set_direction() function

Move the 'git_attr_set_direction()' up to be closer to the variables
that it modifies as well as a small formatting by renaming the variable
'new' to 'new_direction' so that it is more descriptive.

Update the comment about how 'direction' is used to read the state of
the world.  It should be noted that callers of
'git_attr_set_direction()' should ensure that other threads are not
making calls into the attribute system until after the call to
'git_attr_set_direction()' completes.  This function essentially acts as
reset button for the attribute system and should be handled with care.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c
attr.h