[Outreachy] [PATCH v2] bisect--helper: convert `*_warning` char pointers to char arrays.
From: Miriam Rubio <hidden>
Date: 2019-12-14 08:12:36
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Tanushree Tumane <redacted> Instead of using a pointer that points at a constant string, just give name directly to the constant string; this way, we do not have to allocate a pointer variable in addition to the string we want to use. Let's convert `need_bad_and_good_revision_warning` and `need_bisect_start_warning` char pointers to char arrays. Mentored-by: Christian Couder [off-list ref] Signed-off-by: Tanushree Tumane <redacted> Signed-off-by: Miriam Rubio <redacted> Helped-by: Junio C Hamano [off-list ref] --- This patch is a new version of: https://public-inbox.org/git/cadc46442d5c960caa58227092289fa2f44fb96f.1551003074.git.gitgitgadget@gmail.com/ sent previously by Tanushree Tumane. builtin/bisect--helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 3055b2bb50..1718df7f09 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c@@ -282,11 +282,11 @@ static int mark_good(const char *refname, const struct object_id *oid, return 1; } -static const char *need_bad_and_good_revision_warning = +static const char need_bad_and_good_revision_warning[] = N_("You need to give me at least one %s and %s revision.\n" "You can use \"git bisect %s\" and \"git bisect %s\" for that."); -static const char *need_bisect_start_warning = +static const char need_bisect_start_warning[] = N_("You need to start by \"git bisect start\".\n" "You then need to give me at least one %s and %s revision.\n" "You can use \"git bisect %s\" and \"git bisect %s\" for that.");
--
2.21.0 (Apple Git-122.2)