BUG(): remove leading underscore of the format string
BUG() is not end-user facing but programmer facing, and we do not use _("...") in them. Replace all `BUG(_("..."))` with `BUG("...")` Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lidong Yan committed
Jun 3, 2025 at 02:01 UTC
5dceb8bd054af0b9955e0751841fb40f13c85fba
3 files changed
+3
-3
builtin/mktag.c
+1
-1
@@ -41,7 +41,7 @@ static int mktag_fsck_error_func(struct fsck_options *o UNUSED,
41
fprintf_ln(stderr, _("error: tag input does not pass fsck: %s"), message);
42
return 1;
43
default:
44
- BUG(_("%d (FSCK_IGNORE?) should never trigger this callback"),
44
+ BUG("%d (FSCK_IGNORE?) should never trigger this callback",
45
msg_type);
46
}
47
}
builtin/worktree.c
+1
-1
@@ -621,7 +621,7 @@ static void print_preparing_worktree_line(int detach,
621
else {
622
struct commit *commit = lookup_commit_reference_by_name(branch);
623
if (!commit)
624
- BUG(_("unreachable: invalid reference: %s"), branch);
624
+ BUG("unreachable: invalid reference: %s", branch);
625
fprintf_ln(stderr, _("Preparing worktree (detached HEAD %s)"),
626
repo_find_unique_abbrev(the_repository, &commit->object.oid, DEFAULT_ABBREV));
627
}
pack-bitmap-write.c
+1
-1
@@ -1054,7 +1054,7 @@ void bitmap_writer_finish(struct bitmap_writer *writer,
1054
oid_access);
1055
1056
if (commit_pos < 0)
1057
- BUG(_("trying to write commit not in index"));
1057
+ BUG("trying to write commit not in index");
1058
stored->commit_pos = commit_pos;
1059
}
1060