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:
Patrick Steinhardt
2024-06-07 08:37:39 +02:00
committed by Junio C Hamano
parent 5529cba09f
commit b567004b4b
38 changed files with 106 additions and 102 deletions

2
refs.h
View File

@ -975,7 +975,7 @@ struct ref_store *get_worktree_ref_store(const struct worktree *wt);
*/
struct ref_namespace_info {
char *ref;
const char *ref;
enum decoration_type decoration;
/*