Patrick Steinhardt
fc06676766
builtin/rebase: always store allocated string in options.strategy
...
The `struct rebase_options::strategy` field is a `char *`, but we do end
up assigning string constants to it in two cases:
- When being passed a `--strategy=` option via the command line.
- When being passed a strategy option via `--strategy-option=`, but
not a strategy.
This will cause warnings once we enable `-Wwrite-strings`.
Ideally, we'd just convert the field to be a `const char *`. But we also
assign to this field via the GIT_TEST_MERGE_ALGORITHM envvar, which we
have to strdup(3P) into it.
Instead, refactor the code to make sure that we only ever assign
allocated strings to this field.
Signed-off-by: Patrick Steinhardt <ps@pks.im >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2024-06-07 10:30:55 -07:00
..
2024-05-08 10:18:44 -07:00
2024-05-16 10:10:14 -07:00
2023-12-26 12:04:31 -08:00
2023-12-26 12:04:33 -08:00
2024-06-07 10:30:48 -07:00
2024-06-07 10:30:48 -07:00
2024-05-20 11:20:04 -07:00
2024-06-07 10:30:48 -07:00
2024-04-18 12:30:42 -07:00
2024-04-18 12:30:42 -07:00
2024-06-07 10:30:48 -07:00
2024-04-18 12:30:42 -07:00
2024-05-27 11:19:58 -07:00
2024-04-18 12:30:42 -07:00
2024-06-07 10:30:49 -07:00
2024-02-13 10:18:50 -08:00
2024-02-08 13:20:34 -08:00
2023-12-26 12:04:31 -08:00
2024-06-07 10:30:48 -07:00
2024-05-29 09:32:24 -07:00
2024-05-08 10:18:44 -07:00
2024-05-08 10:18:44 -07:00
2024-04-16 22:39:06 -07:00
2024-05-27 11:20:01 -07:00
2024-05-16 10:10:14 -07:00
2024-06-07 10:30:48 -07:00
2023-12-26 12:04:31 -08:00
2023-12-26 12:04:31 -08:00
2024-04-18 12:30:42 -07:00
2024-04-18 12:30:42 -07:00
2024-04-18 12:30:42 -07:00
2024-02-12 09:32:41 -08:00
2024-05-20 11:20:04 -07:00
2024-06-07 10:30:49 -07:00
2024-05-15 07:30:52 -07:00
2024-04-24 10:46:03 -07:00
2024-05-07 10:06:59 -07:00
2023-12-26 12:04:33 -08:00
2024-05-07 10:06:59 -07:00
2023-12-26 12:04:31 -08:00
2024-03-28 14:13:50 -07:00
2023-12-26 12:04:31 -08:00
2023-12-26 12:04:31 -08:00
2024-03-02 11:12:16 -08:00
2024-04-19 12:38:42 +02:00
2024-05-23 11:04:27 -07:00
2024-06-07 10:30:48 -07:00
2024-03-25 11:59:24 -07:00
2024-01-08 14:05:15 -08:00
2024-04-03 10:56:20 -07:00
2023-12-26 12:04:31 -08:00
2024-06-07 10:30:48 -07:00
2024-02-29 08:06:01 -08:00
2024-04-18 12:30:42 -07:00
2023-12-26 12:04:31 -08:00
2024-04-18 12:30:42 -07:00
2024-05-27 11:20:00 -07:00
2023-12-26 12:04:33 -08:00
2024-04-17 12:35:41 -07:00
2024-05-27 11:20:03 -07:00
2024-05-07 10:06:59 -07:00
2024-05-20 11:20:04 -07:00
2024-05-28 11:17:07 -07:00
2024-03-25 09:54:07 -07:00
2024-06-07 10:30:48 -07:00
2024-02-08 16:22:10 -08:00
2023-12-26 12:04:31 -08:00
2024-04-18 12:30:42 -07:00
2024-06-07 10:30:55 -07:00
2024-06-07 10:30:48 -07:00
2024-05-07 10:06:59 -07:00
2024-06-07 10:30:50 -07:00
2024-05-27 11:20:00 -07:00
2024-05-20 11:20:04 -07:00
2024-04-18 12:30:42 -07:00
2023-12-26 12:04:31 -08:00
2024-05-16 10:10:14 -07:00
2024-04-01 13:21:34 -07:00
2024-05-16 10:10:14 -07:00
2024-06-07 10:30:48 -07:00
2024-04-18 12:30:42 -07:00
2024-06-07 10:30:53 -07:00
2024-03-19 17:54:15 -07:00
2024-05-07 10:06:59 -07:00
2024-05-07 10:06:59 -07:00
2024-02-08 16:22:10 -08:00
2024-05-16 10:10:14 -07:00
2024-03-12 13:28:10 -07:00
2024-05-16 10:10:14 -07:00
2024-05-20 11:20:04 -07:00
2024-05-20 11:20:04 -07:00
2024-03-02 11:12:16 -08:00
2024-05-16 10:10:14 -07:00
2024-05-20 11:20:04 -07:00
2024-04-29 20:42:30 +02:00
2024-01-18 12:17:41 -08:00
2023-12-26 12:04:31 -08:00
2023-12-26 12:04:31 -08:00
2024-05-27 11:19:58 -07:00
2024-04-18 12:30:42 -07:00