]> git.ipfire.org Git - thirdparty/git.git/commit
global: improve const correctness when assigning string constants
authorPatrick Steinhardt <ps@pks.im>
Fri, 7 Jun 2024 06:37:39 +0000 (08:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Jun 2024 17:30:48 +0000 (10:30 -0700)
commitb567004b4b43f9b0d88aa1f0b15698eae8f15836
treefc7b75831c1eb79a89c0196fbb78bd6b7d09d0b1
parent5529cba09ff89b9762dbfd8f622e897948b60ab7
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>
38 files changed:
builtin/bisect.c
builtin/blame.c
builtin/bugreport.c
builtin/check-ignore.c
builtin/clone.c
builtin/commit.c
builtin/diagnose.c
builtin/log.c
builtin/mailsplit.c
builtin/pull.c
builtin/receive-pack.c
builtin/revert.c
compat/regex/regcomp.c
diff.c
diffcore-rename.c
fmt-merge-msg.c
fsck.c
fsck.h
gpg-interface.c
http-backend.c
imap-send.c
pretty.c
refs.c
refs.h
reftable/basics.c
reftable/basics.h
reftable/basics_test.c
reftable/record.c
reftable/stack.c
reftable/stack_test.c
run-command.c
t/helper/test-hashmap.c
t/helper/test-json-writer.c
t/helper/test-regex.c
t/helper/test-rot13-filter.c
t/unit-tests/t-strbuf.c
trailer.c
wt-status.c