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);
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;
}
}
}