From ea56f97749f6ded2b5d41c4c4ba41b53850b2872 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 27 Dec 2017 17:18:37 +0700 Subject: [PATCH] wt-status.c: catch unhandled diff status codes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- wt-status.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wt-status.c b/wt-status.c index 181d253605..784380830c 100644 --- a/wt-status.c +++ b/wt-status.c @@ -469,8 +469,8 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q, oidcpy(&d->oid_index, &p->one->oid); break; - case DIFF_STATUS_UNKNOWN: - die("BUG: worktree status unknown???"); + default: + die("BUG: unhandled diff-files status '%c'", p->status); break; } @@ -550,6 +550,10 @@ static void wt_status_collect_updated_cb(struct diff_queue_struct *q, * values in these fields. */ break; + + default: + die("BUG: unhandled diff-index status '%c'", p->status); + break; } } } -- 2.34.1