summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-12-27 17:18:37 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-12-27 12:38:35 -0800
commitea56f97749f6ded2b5d41c4c4ba41b53850b2872 (patch)
treeb537d40754d7fe2f91c26d492d9c0d3b0d4a0505 /wt-status.c
parentwt-status.c: coding style fix (diff)
downloadtgif-ea56f97749f6ded2b5d41c4c4ba41b53850b2872.tar.xz
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>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/wt-status.c b/wt-status.c
index 181d253605..784380830c 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -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;
}
}
}