Tanay Abhra
c8466645ed
make config --add behave correctly for empty and NULL values
...
Currently if we have a config file like,
[foo]
baz
bar =
and we try something like, "git config --add foo.baz roll", Git will
segfault. Moreover, for "git config --add foo.bar roll", it will
overwrite the original value instead of appending after the existing
empty value.
The problem lies with the regexp used for simulating --add in
`git_config_set_multivar_in_file()`, "^$", which in ideal case should
not match with any string but is true for empty strings. Instead use a
regexp like "a^" which can not be true for any string, empty or not.
For removing the segfault add a check for NULL values in `matches()` in
config.c.
Signed-off-by: Tanay Abhra <tanayabh@gmail.com >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2014-08-18 10:45:59 -07:00
..
2014-03-28 13:51:05 -07:00
2014-07-16 11:10:11 -07:00
2014-07-21 10:37:02 -07:00
2013-12-05 14:13:21 -08:00
2013-08-05 11:32:19 -07:00
2014-07-28 10:14:33 -07:00
2014-02-20 14:15:46 -08:00
2014-03-25 11:07:36 -07:00
2014-03-18 14:03:03 -07:00
2013-09-20 12:37:32 -07:00
2013-07-13 10:19:37 -07:00
2013-10-30 12:10:56 -07:00
2014-04-09 12:03:26 -07:00
2014-07-21 10:30:21 -07:00
2014-06-23 14:31:35 -07:00
2013-12-05 14:13:21 -08:00
2014-06-12 10:29:41 -07:00
2014-07-16 11:16:38 -07:00
2014-08-18 10:45:59 -07:00
2014-03-14 14:25:31 -07:00
2013-07-15 10:56:08 -07:00
2013-07-15 10:56:08 -07:00
2014-07-28 10:14:34 -07:00
2013-12-27 14:58:17 -08:00
2014-06-13 12:09:38 -07:00
2014-01-17 12:21:20 -08:00
2014-02-27 14:01:30 -08:00
2014-06-13 12:09:38 -07:00
2014-02-20 14:15:46 -08:00
2014-06-13 12:07:47 -07:00
2014-06-25 11:47:36 -07:00
2013-12-03 12:35:22 -08:00
2014-06-25 11:47:49 -07:00
2013-08-07 08:30:55 -07:00
2014-01-06 11:26:31 -08:00
2014-07-21 10:30:21 -07:00
2014-04-17 11:09:56 -07:00
2014-07-16 11:16:38 -07:00
2014-02-24 14:37:19 -08:00
2014-05-27 14:00:43 -07:00
2014-02-24 14:37:14 -08:00
2014-06-25 11:48:23 -07:00
2014-02-13 13:38:59 -08:00
2013-08-05 11:32:19 -07:00
2013-07-09 09:12:48 -07:00
2013-12-05 14:13:21 -08:00
2013-05-06 22:17:00 -07:00
2014-06-12 10:29:41 -07:00
2014-03-03 14:54:45 -08:00
2014-06-25 11:48:34 -07:00
2014-02-20 14:15:46 -08:00
2014-03-24 10:43:34 -07:00
2014-04-08 12:00:33 -07:00
2013-05-01 15:33:11 -07:00
2014-02-24 09:08:37 -08:00
2014-03-14 14:27:06 -07:00
2014-03-07 15:18:28 -08:00
2013-10-16 10:26:39 -07:00
2014-02-27 12:07:13 -08:00
2014-02-20 14:15:46 -08:00
2014-07-22 10:25:17 -07:00
2014-07-10 11:10:05 -07:00
2014-03-14 14:27:06 -07:00
2014-04-30 10:30:02 -07:00
2014-06-13 12:08:17 -07:00
2014-06-13 12:09:38 -07:00
2014-03-23 17:28:03 -07:00
2014-03-24 10:43:34 -07:00
2014-02-27 14:01:15 -08:00
2014-01-17 12:21:20 -08:00
2013-12-05 14:13:21 -08:00
2014-02-20 14:15:46 -08:00
2013-12-05 14:13:21 -08:00
2013-09-06 13:33:17 -07:00
2013-12-05 14:13:21 -08:00
2014-03-24 10:43:34 -07:00
2014-03-14 14:27:06 -07:00
2014-06-04 11:02:55 -07:00
2014-04-02 10:40:43 -07:00
2013-12-05 14:13:21 -08:00