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>
This commit is contained in:
Lidong Yan
2025-06-03 02:01:14 +00:00
committed by Junio C Hamano
parent d50a5e8939
commit 5dceb8bd05
3 changed files with 3 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ static int mktag_fsck_error_func(struct fsck_options *o UNUSED,
fprintf_ln(stderr, _("error: tag input does not pass fsck: %s"), message); fprintf_ln(stderr, _("error: tag input does not pass fsck: %s"), message);
return 1; return 1;
default: default:
BUG(_("%d (FSCK_IGNORE?) should never trigger this callback"), BUG("%d (FSCK_IGNORE?) should never trigger this callback",
msg_type); msg_type);
} }
} }

View File

@@ -621,7 +621,7 @@ static void print_preparing_worktree_line(int detach,
else { else {
struct commit *commit = lookup_commit_reference_by_name(branch); struct commit *commit = lookup_commit_reference_by_name(branch);
if (!commit) if (!commit)
BUG(_("unreachable: invalid reference: %s"), branch); BUG("unreachable: invalid reference: %s", branch);
fprintf_ln(stderr, _("Preparing worktree (detached HEAD %s)"), fprintf_ln(stderr, _("Preparing worktree (detached HEAD %s)"),
repo_find_unique_abbrev(the_repository, &commit->object.oid, DEFAULT_ABBREV)); repo_find_unique_abbrev(the_repository, &commit->object.oid, DEFAULT_ABBREV));
} }

View File

@@ -1054,7 +1054,7 @@ void bitmap_writer_finish(struct bitmap_writer *writer,
oid_access); oid_access);
if (commit_pos < 0) if (commit_pos < 0)
BUG(_("trying to write commit not in index")); BUG("trying to write commit not in index");
stored->commit_pos = commit_pos; stored->commit_pos = commit_pos;
} }