From: Nguyễn Thái Ngọc Duy Date: Wed, 27 Dec 2017 10:18:37 +0000 (+0700) Subject: wt-status.c: catch unhandled diff status codes X-Git-Tag: v2.17.0-rc0~152^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea56f97749f6ded2b5d41c4c4ba41b53850b2872;p=thirdparty%2Fgit.git wt-status.c: catch unhandled diff status codes Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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; } } }