mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat(config): add api for config entry
This commit is contained in:
parent
cf677e488a
commit
7b8dfcc1af
6 changed files with 163 additions and 45 deletions
|
@ -13,8 +13,8 @@ void main() async {
|
|||
final config = Config.open();
|
||||
|
||||
print('All entries of system/global config:');
|
||||
for (final entry in config.variables.entries) {
|
||||
print('${entry.key}: ${entry.value}');
|
||||
for (final entry in config) {
|
||||
print('${entry.name}: ${entry.value}');
|
||||
}
|
||||
// free() should be called on object to free memory when done.
|
||||
config.free();
|
||||
|
@ -25,8 +25,8 @@ void main() async {
|
|||
final repoConfig = Config.open('$tmpDir/.git/config');
|
||||
|
||||
print('\nAll entries of repo config:');
|
||||
for (final entry in repoConfig.variables.entries) {
|
||||
print('${entry.key}: ${entry.value}');
|
||||
for (final entry in repoConfig) {
|
||||
print('${entry.name}: ${entry.value}');
|
||||
}
|
||||
|
||||
// Set value of config variable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue