mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
0787dafdcc
commit
f0dd042148
3
attr.h
3
attr.h
@@ -72,7 +72,8 @@ enum git_attr_direction {
|
||||
GIT_ATTR_CHECKOUT,
|
||||
GIT_ATTR_INDEX
|
||||
};
|
||||
void git_attr_set_direction(enum git_attr_direction, struct index_state *);
|
||||
void git_attr_set_direction(enum git_attr_direction new_direction,
|
||||
struct index_state *istate);
|
||||
|
||||
extern void attr_start(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user