Skip to content

Commit ea56f97

Browse files
pcloudsgitster
authored andcommitted
wt-status.c: catch unhandled diff status codes
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 98bc94e commit ea56f97

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

wt-status.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
469469
oidcpy(&d->oid_index, &p->one->oid);
470470
break;
471471

472-
case DIFF_STATUS_UNKNOWN:
473-
die("BUG: worktree status unknown???");
472+
default:
473+
die("BUG: unhandled diff-files status '%c'", p->status);
474474
break;
475475
}
476476

@@ -550,6 +550,10 @@ static void wt_status_collect_updated_cb(struct diff_queue_struct *q,
550550
* values in these fields.
551551
*/
552552
break;
553+
554+
default:
555+
die("BUG: unhandled diff-index status '%c'", p->status);
556+
break;
553557
}
554558
}
555559
}

0 commit comments

Comments
 (0)