Integrated: 2080: ini: allow values to be updated
Erik Duveblad
ehelin at openjdk.org
Fri Oct 27 13:17:19 UTC 2023
On Fri, 27 Oct 2023 08:12:27 GMT, Erik Duveblad <ehelin at openjdk.org> wrote:
> Hi all,
>
> please review this patch that makes the `INI` parser allow values to be updated _if_ they are set multiple times in a file. The below example would result in the key `name` having the value `jane`:
>
>
> name=john
> name=jane
>
>
> Values in sections and sub-sections can now also be updated, the below example would result in the key `age` in the subsection `[person "john"]` having the value `47`:
>
>
> [person]
> age=0
>
> [person "john"]
> age=1
>
> [person "john"]
> age=47
>
>
> This is in line with how Git's INI parser is working, see the following example:
>
>
> $ printf '[test]\nfoo=bar\n' >> .git/config
> $ printf '[test]\nfoo=baz\n' >> .git/config
> $ cat .git/config
> [test]
> foo=bar
> [test]
> foo=baz
> $ git config test.foo
> baz
>
>
> Enabling keys to be updated makes modifying just a single key in a `.jcheck/conf` easier. Appending the following to any `.jcheck/conf` would make merge commits requiring reviews:
>
>
> [checks "reviewer"]
> merge=check
>
>
> This property will be used to simplify [AdditionalConfiguration](https://github.com/openjdk/skara/blob/master/bots/pr/src/main/java/org/openjdk/skara/bots/pr/AdditionalConfiguration.java) in an upcoming PR.
>
> Thanks,
> Erik
This pull request has now been integrated.
Changeset: 0c638161
Author: Erik Duveblad <ehelin at openjdk.org>
URL: https://git.openjdk.org/skara/commit/0c63816196a00e157592b9d091a8c0c94912556f
Stats: 60 lines in 2 files changed: 44 ins; 9 del; 7 mod
2080: ini: allow values to be updated
Reviewed-by: erikj
-------------
PR: https://git.openjdk.org/skara/pull/1577
More information about the skara-dev
mailing list