Skip to content

Commit 7c5cea7

Browse files
tanushree27gitster
authored andcommitted
bisect--helper: convert *_warning char pointers to char arrays.
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 <[email protected]> Signed-off-by: Tanushree Tumane <[email protected]> Signed-off-by: Miriam Rubio <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 53a06cf commit 7c5cea7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/bisect--helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,11 @@ static int mark_good(const char *refname, const struct object_id *oid,
281281
return 1;
282282
}
283283

284-
static const char *need_bad_and_good_revision_warning =
284+
static const char need_bad_and_good_revision_warning[] =
285285
N_("You need to give me at least one %s and %s revision.\n"
286286
"You can use \"git bisect %s\" and \"git bisect %s\" for that.");
287287

288-
static const char *need_bisect_start_warning =
288+
static const char need_bisect_start_warning[] =
289289
N_("You need to start by \"git bisect start\".\n"
290290
"You then need to give me at least one %s and %s revision.\n"
291291
"You can use \"git bisect %s\" and \"git bisect %s\" for that.");

0 commit comments

Comments
 (0)