]> git.ipfire.org Git - thirdparty/git.git/commitdiff
BUG(): remove leading underscore of the format string
authorLidong Yan <502024330056@smail.nju.edu.cn>
Tue, 3 Jun 2025 02:01:14 +0000 (02:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jun 2025 15:36:11 +0000 (08:36 -0700)
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>
builtin/mktag.c
builtin/worktree.c
pack-bitmap-write.c

index 6e188dce50a4f51bb1fb3dc72dd7236d79830f03..6d839fd81747023f25ae2c4bc1e0cfeec79983f9 100644 (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);
                return 1;
        default:
-               BUG(_("%d (FSCK_IGNORE?) should never trigger this callback"),
+               BUG("%d (FSCK_IGNORE?) should never trigger this callback",
                    msg_type);
        }
 }
index 48448a835509445acc104124eada94dab4b9cd43..658731492c5b642b9da37e8acf0f6673d85ce705 100644 (file)
@@ -621,7 +621,7 @@ static void print_preparing_worktree_line(int detach,
                else {
                        struct commit *commit = lookup_commit_reference_by_name(branch);
                        if (!commit)
-                               BUG(_("unreachable: invalid reference: %s"), branch);
+                               BUG("unreachable: invalid reference: %s", branch);
                        fprintf_ln(stderr, _("Preparing worktree (detached HEAD %s)"),
                                  repo_find_unique_abbrev(the_repository, &commit->object.oid, DEFAULT_ABBREV));
                }
index 34e86d49947d231abb6c9958e4e02810f5a723db..23ec32a9927eaddd95342249f523c0ea597fd93a 100644 (file)
@@ -1054,7 +1054,7 @@ void bitmap_writer_finish(struct bitmap_writer *writer,
                                         oid_access);
 
                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;
        }