attr.c: make bootstrap_attr_stack() leave early
Thas would de-dent the body of a function that has grown rather large over time, making it a bit easier to read. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
5
attr.c
5
attr.c
@ -488,9 +488,11 @@ static int git_attr_config(const char *var, const char *value, void *dummy)
|
||||
|
||||
static void bootstrap_attr_stack(void)
|
||||
{
|
||||
if (!attr_stack) {
|
||||
struct attr_stack *elem;
|
||||
|
||||
if (attr_stack)
|
||||
return;
|
||||
|
||||
elem = read_attr_from_array(builtin_attr);
|
||||
elem->origin = NULL;
|
||||
elem->prev = attr_stack;
|
||||
@ -530,7 +532,6 @@ static void bootstrap_attr_stack(void)
|
||||
elem->prev = attr_stack;
|
||||
attr_stack = elem;
|
||||
}
|
||||
}
|
||||
|
||||
static void prepare_attr_stack(const char *path, int dirlen)
|
||||
{
|
||||
|
Reference in New Issue
Block a user