refactor(config): simplify api methods names

This commit is contained in:
Aleksey Kulikov 2021-08-21 11:25:06 +03:00
parent 9873d6ccc0
commit da8494d3e2
5 changed files with 50 additions and 59 deletions

View file

@ -222,7 +222,7 @@ Map<String, String> getEntries(Pointer<git_config> cfg) {
/// (usually the local one).
///
/// Throws a [LibGit2Error] if error occured.
void deleteEntry(Pointer<git_config> cfg, String variable) {
void delete(Pointer<git_config> cfg, String variable) {
final name = variable.toNativeUtf8().cast<Int8>();
final error = libgit2.git_config_delete_entry(cfg, name);
calloc.free(name);
@ -236,7 +236,7 @@ void deleteEntry(Pointer<git_config> cfg, String variable) {
///
/// If regexp is present, then the iterator will only iterate over all
/// values which match the pattern.
List<String> getMultivarValue(
List<String> multivarValues(
Pointer<git_config> cfg,
String variable,
String? regexp,
@ -270,7 +270,7 @@ List<String> getMultivarValue(
/// highest level (usually the local one).
///
/// The regexp is applied case-sensitively on the value.
void setMultivarValue(
void setMultivar(
Pointer<git_config> cfg,
String variable,
String regexp,