summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-12-07 11:05:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-12-07 20:31:17 (GMT)
commita78537a0f26615b69b680845cfbb765cc665c808 (patch)
tree4d4cfb18333179aefb4cd75f5ab439dbd7796ce6 /tree-diff.c
parent46d699f492b86d7d9b84ca9c56c837ce80643dc2 (diff)
downloadgit-a78537a0f26615b69b680845cfbb765cc665c808.zip
git-a78537a0f26615b69b680845cfbb765cc665c808.tar.gz
git-a78537a0f26615b69b680845cfbb765cc665c808.tar.bz2
pathspec: use BUG(...) not die("BUG:%s:%d....", <file>, <line>)
Change code that was added in 8f4f8f4579f (guard against new pathspec magic in pathspec matching code, 2013-07-14) to use the BUG() macro instead of emitting a "fatal" message with the "__FILE__"-name and "__LINE__"-numbers. The original code predated the existence of the BUG() function, which was added in d8193743e08 (usage.c: add BUG() function, 2017-05-12). Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-diff.c')
-rw-r--r--tree-diff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tree-diff.c b/tree-diff.c
index 437c98a..69031d7 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -603,8 +603,7 @@ static void try_to_follow_renames(const struct object_id *old_oid,
* about dry-run mode and returns wildcard info.
*/
if (opt->pathspec.has_wildcard)
- die("BUG:%s:%d: wildcards are not supported",
- __FILE__, __LINE__);
+ BUG("wildcards are not supported");
#endif
/* Remove the file creation entry from the diff queue, and remember it */