From efbd4fdfc9978bf3872ca8cf390da4ffa3480188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sun, 1 Oct 2017 09:29:03 +0200 Subject: refs: pass NULL to resolve_refdup() if hash is not needed This allows us to get rid of several write-only variables. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- wt-status.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'wt-status.c') diff --git a/wt-status.c b/wt-status.c index ac972acbab..c97282cf5a 100644 --- a/wt-status.c +++ b/wt-status.c @@ -121,15 +121,13 @@ static void status_printf_more(struct wt_status *s, const char *color, void wt_status_prepare(struct wt_status *s) { - struct object_id oid; - memset(s, 0, sizeof(*s)); memcpy(s->color_palette, default_wt_status_colors, sizeof(default_wt_status_colors)); s->show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES; s->use_color = -1; s->relative_paths = 1; - s->branch = resolve_refdup("HEAD", 0, oid.hash, NULL); + s->branch = resolve_refdup("HEAD", 0, NULL, NULL); s->reference = "HEAD"; s->fp = stdout; s->index_file = get_index_file(); -- cgit v1.2.3