pathspec: provide a more descriptive die message
authorBrandon Williams <bmwill@google.com>
Tue, 9 May 2017 19:17:58 +0000 (12:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 May 2017 05:47:36 +0000 (14:47 +0900)
The current message displayed upon an internal error in
'init_pathspec_item()' isn't very descriptive and doesn't provide much
context to where the error occurred. Update the error message to
provide more context to where the error occured.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pathspec.c
index 50f76fff458e45f57ae67c3474de8378f390f978..904cfb739378bb8d8efc8fdb4327eb0c251bc181 100644 (file)
@@ -555,7 +555,7 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
                 * would trigger that.
                 */
                die_inside_submodule_path(item);
-               die ("BUG: item->nowildcard_len > item->len || item->prefix > item->len)");
+               die ("BUG: error initializing pathspec_item");
        }
 }