refactor: use clearer names for params

This commit is contained in:
Aleksey Kulikov 2021-06-18 17:19:01 +03:00
parent 2d1c026e73
commit 4bc2da5800
2 changed files with 34 additions and 34 deletions

View file

@ -134,33 +134,33 @@ class Config {
}
}
/// Deletes variable from the config file with the highest level
/// Deletes [variable] from the config file with the highest level
/// (usually the local one).
///
/// Throws a [LibGit2Error] if error occured.
void deleteVariable(String key) {
void deleteVariable(String variable) {
try {
config.deleteVariable(configPointer.value, key);
config.deleteVariable(configPointer.value, variable);
} catch (e) {
rethrow;
}
}
/// Returns list of values for multivar [key]
/// Returns list of values for multivar [variable]
///
/// If [regexp] is present, then the iterator will only iterate over all
/// values which match the pattern.
List<String> getMultivar(String key, {String? regexp}) {
return config.getMultivar(configPointer.value, key, regexp);
List<String> getMultivar(String variable, {String? regexp}) {
return config.getMultivar(configPointer.value, variable, regexp);
}
/// Sets the [value] of a multivar [key] in the config file with the
/// Sets the [value] of a multivar [variable] in the config file with the
/// highest level (usually the local one).
///
/// The [regexp] is applied case-sensitively on the value.
/// Empty [regexp] sets [value] for all values of a multivar [key]
void setMultivar(String key, String regexp, String value) {
config.setMultivar(configPointer.value, key, regexp, value);
/// Empty [regexp] sets [value] for all values of a multivar [variable]
void setMultivar(String variable, String regexp, String value) {
config.setMultivar(configPointer.value, variable, regexp, value);
}
/// Releases memory allocated for config object.