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>
Nguyễn Thái Ngọc Duy committed
Dec 27, 2017 at 17:18 UTC
ea56f97749f6ded2b5d41c4c4ba41b53850b2872
1 file changed
+6
-2
wt-status.c
+6
-2
@@ -469,8 +469,8 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
469
oidcpy(&d->oid_index, &p->one->oid);
470
break;
471
472
- case DIFF_STATUS_UNKNOWN:
473
- die("BUG: worktree status unknown???");
472
+ default:
473
+ die("BUG: unhandled diff-files status '%c'", p->status);
474
break;
475
}
476
@@ -550,6 +550,10 @@ static void wt_status_collect_updated_cb(struct diff_queue_struct *q,
550
* values in these fields.
551
*/
552
break;
553
+
554
+ default:
555
+ die("BUG: unhandled diff-index status '%c'", p->status);
556
+ break;
557
}
558
}
559
}