提交 909ca7b9 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <gitster@pobox.com>
上级 77f7f822
......@@ -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;
......@@ -529,7 +531,6 @@ static void bootstrap_attr_stack(void)
elem->origin = NULL;
elem->prev = attr_stack;
attr_stack = elem;
}
}
static void prepare_attr_stack(const char *path, int dirlen)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册