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
@ -113,7 +113,7 @@ static char *template_file;
|
||||
* the commit message and/or authorship.
|
||||
*/
|
||||
static const char *author_message, *author_message_buffer;
|
||||
static char *edit_message, *use_message;
|
||||
static const char *edit_message, *use_message;
|
||||
static char *fixup_message, *fixup_commit, *squash_message;
|
||||
static const char *fixup_prefix;
|
||||
static int all, also, interactive, patch_interactive, only, amend, signoff;
|
||||
@ -121,8 +121,8 @@ static int edit_flag = -1; /* unspecified */
|
||||
static int quiet, verbose, no_verify, allow_empty, dry_run, renew_authorship;
|
||||
static int config_commit_verbose = -1; /* unspecified */
|
||||
static int no_post_rewrite, allow_empty_message, pathspec_file_nul;
|
||||
static char *untracked_files_arg, *force_date, *ignore_submodule_arg, *ignored_arg;
|
||||
static char *sign_commit, *pathspec_from_file;
|
||||
static const char *untracked_files_arg, *force_date, *ignore_submodule_arg, *ignored_arg;
|
||||
static const char *sign_commit, *pathspec_from_file;
|
||||
static struct strvec trailer_args = STRVEC_INIT;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user