]> git.ipfire.org Git - thirdparty/git.git/commitdiff
wt-status.c: catch unhandled diff status codes
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 27 Dec 2017 10:18:37 +0000 (17:18 +0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Dec 2017 20:38:35 +0000 (12:38 -0800)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c

index 181d2536054d087ed67ae3e7b9e2973098c9aa97..784380830c1f189559e98859af5f1c45f0e6c8c9 100644 (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;
                }
        }
 }