summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-10-01 07:29:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-01 08:27:14 (GMT)
commitefbd4fdfc9978bf3872ca8cf390da4ffa3480188 (patch)
treeb3e8b62af87e612724c2b4a95dc2cbf1c94f6e90 /wt-status.c
parent872ccb2c69ce44abb198efa1013dd4e0887a7495 (diff)
downloadgit-efbd4fdfc9978bf3872ca8cf390da4ffa3480188.zip
git-efbd4fdfc9978bf3872ca8cf390da4ffa3480188.tar.gz
git-efbd4fdfc9978bf3872ca8cf390da4ffa3480188.tar.bz2
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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c
index ac972ac..c97282c 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();