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

wt_status_prepare(): clean up structure initialization.

Otherwise it would be a pain to add members to it.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 02f571c7
......@@ -47,17 +47,10 @@ void wt_status_prepare(struct wt_status *s)
unsigned char sha1[20];
const char *head;
memset(s, 0, sizeof(*s));
head = resolve_ref("HEAD", sha1, 0, NULL);
s->branch = head ? xstrdup(head) : NULL;
s->reference = "HEAD";
s->amend = 0;
s->verbose = 0;
s->untracked = 0;
s->commitable = 0;
s->workdir_dirty = 0;
s->workdir_untracked = 0;
}
static void wt_status_print_cached_header(const char *reference)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册