Skip to main content

is_true

Function is_true 

Source
pub fn is_true(value: &str) -> bool
Expand description

Whether a value is one of git’s spellings of true.

Git accepts 1, yes and on beside true, case insensitively. Every caller that branches on a git boolean has to accept the same set, or a perfectly ordinary required = 1 reads as “off”.

The empty string is not in the set. Git reads key = as false (measured with git config --type=bool on 2.55), and the value-less key that git does read as true never arrives here as empty — get returns it as "true".