Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-12-07 14:05:53 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-07 23:31:17 +0300
commita78537a0f26615b69b680845cfbb765cc665c808 (patch)
tree4d4cfb18333179aefb4cd75f5ab439dbd7796ce6 /pathspec.h
parent46d699f492b86d7d9b84ca9c56c837ce80643dc2 (diff)
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 'pathspec.h')
-rw-r--r--pathspec.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/pathspec.h b/pathspec.h
index 2341dc9901..402ebb8080 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -58,8 +58,7 @@ struct pathspec {
#define GUARD_PATHSPEC(ps, mask) \
do { \
if ((ps)->magic & ~(mask)) \
- die("BUG:%s:%d: unsupported magic %x", \
- __FILE__, __LINE__, (ps)->magic & ~(mask)); \
+ BUG("unsupported magic %x", (ps)->magic & ~(mask)); \
} while (0)
/* parse_pathspec flags */