aboutsummaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-09 16:22:42 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-09 16:26:02 -0800
commitcc46a74398e6a542d61d8fa0b197b7dedcd7f301 (patch)
tree864bb24970d00f44ae924a65908c60176865dab6 /wt-status.c
parent02f571c73bfdf1d950848ed24229caea438f1f72 (diff)
downloadgit-cc46a74398e6a542d61d8fa0b197b7dedcd7f301.tar.gz
git-cc46a74398e6a542d61d8fa0b197b7dedcd7f301.tar.xz
wt_status_prepare(): clean up structure initialization.
Otherwise it would be a pain to add members to it. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/wt-status.c b/wt-status.c
index 556786800..2879c3d5e 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -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)