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:
Junio C Hamano
2012-01-10 12:27:37 -08:00
parent 77f7f82288
commit 909ca7b9ac

5
attr.c
View File

@ -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)
{