Browse Source
The C git API and command line tools distinguish between a key having the empty string as a value and no key being present in the config file: $ echo -e '[a]\nx =' > foo.config $ git config -f foo.config a.x; echo $? 0 $ git config -f foo.config a.y; echo $? 1 Make JGit make the same distinction. This is in line with the current Javadoc of getString, which claims to return "a String value from the config, null if not found". It is more reasonable to interpret "x =" in the above example as "found" rather than "missing". We need to maintain the special handling of a key name with no "=" resolving to a boolean true, but "=" with an empty string is still not a valid boolean. Change-Id: If0dbb7470c524259de0b167148db87f81be2d04astable-4.1
Dave Borowitz
10 years ago
2 changed files with 50 additions and 23 deletions
Loading…
Reference in new issue