Skip to content

Commit

Permalink
wt-status.c: catch unhandled diff status codes
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
pclouds authored and gitster committed Dec 27, 2017
1 parent 98bc94e commit ea56f97
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit ea56f97

Please sign in to comment.