wt-status.c: catch unhandled diff status codes

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2017-12-27 17:18:37 +07:00 committed by Junio C Hamano
parent 98bc94ec79
commit ea56f97749

View File

@ -469,8 +469,8 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
oidcpy(&d->oid_index, &p->one->oid); oidcpy(&d->oid_index, &p->one->oid);
break; break;
case DIFF_STATUS_UNKNOWN: default:
die("BUG: worktree status unknown???"); die("BUG: unhandled diff-files status '%c'", p->status);
break; break;
} }
@ -550,6 +550,10 @@ static void wt_status_collect_updated_cb(struct diff_queue_struct *q,
* values in these fields. * values in these fields.
*/ */
break; break;
default:
die("BUG: unhandled diff-index status '%c'", p->status);
break;
} }
} }
} }