global: improve const correctness when assigning string constants
We're about to enable `-Wwrite-strings`, which changes the type of string constants to `const char[]`. Fix various sites where we assign such constants to non-const variables. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
5529cba09f
commit
b567004b4b
@@ -1249,7 +1249,7 @@ cleanup:
|
||||
return code;
|
||||
}
|
||||
|
||||
static char *refuse_unconfigured_deny_msg =
|
||||
static const char *refuse_unconfigured_deny_msg =
|
||||
N_("By default, updating the current branch in a non-bare repository\n"
|
||||
"is denied, because it will make the index and work tree inconsistent\n"
|
||||
"with what you pushed, and will require 'git reset --hard' to match\n"
|
||||
@@ -1269,7 +1269,7 @@ static void refuse_unconfigured_deny(void)
|
||||
rp_error("%s", _(refuse_unconfigured_deny_msg));
|
||||
}
|
||||
|
||||
static char *refuse_unconfigured_deny_delete_current_msg =
|
||||
static const char *refuse_unconfigured_deny_delete_current_msg =
|
||||
N_("By default, deleting the current branch is denied, because the next\n"
|
||||
"'git clone' won't result in any file checked out, causing confusion.\n"
|
||||
"\n"
|
||||
|
||||
Reference in New Issue
Block a user