Example usage for org.eclipse.jgit.lib StoredConfig getBoolean

List of usage examples for org.eclipse.jgit.lib StoredConfig getBoolean

Introduction

In this page you can find the example usage for org.eclipse.jgit.lib StoredConfig getBoolean.

Prototype

public boolean getBoolean(final String section, final String name, final boolean defaultValue) 

Source Link

Document

Get a boolean value from the git config

Usage

From source file:com.gitblit.GitBlit.java

License:Apache License

/**
 * Returns the gitblit boolean value for the specified key. If key is not
 * set, returns defaultValue./* w  w  w. j  av a  2 s .co m*/
 * 
 * @param config
 * @param field
 * @param defaultValue
 * @return field value or defaultValue
 */
private boolean getConfig(StoredConfig config, String field, boolean defaultValue) {
    return config.getBoolean(Constants.CONFIG_GITBLIT, field, defaultValue);
}