Skip to content

Commit 8b1d8c6

Browse files
authored
Merge pull request #1635 from implausible/feature/expose-config-functions
Expose more config methods
2 parents b823d12 + e166699 commit 8b1d8c6

File tree

2 files changed

+128
-22
lines changed

2 files changed

+128
-22
lines changed

generate/input/descriptor.json

Lines changed: 109 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,14 @@
695695
"ignore": true
696696
},
697697
"git_config_delete_entry": {
698-
"ignore": true
698+
"return": {
699+
"isErrorCode": true
700+
}
699701
},
700702
"git_config_delete_multivar": {
701-
"ignore": true
703+
"return": {
704+
"isErrorCode": true
705+
}
702706
},
703707
"git_config_entry_free": {
704708
"ignore": true
@@ -762,7 +766,14 @@
762766
"ignore": true
763767
},
764768
"git_config_get_bool": {
765-
"ignore": true
769+
"args": {
770+
"out": {
771+
"shouldAlloc": true
772+
}
773+
},
774+
"return": {
775+
"isErrorCode": true
776+
}
766777
},
767778
"git_config_get_entry": {
768779
"args": {
@@ -773,10 +784,26 @@
773784
}
774785
},
775786
"git_config_get_int32": {
776-
"ignore": true
787+
"args": {
788+
"out": {
789+
"cType": "int32_t *",
790+
"shouldAlloc": true
791+
}
792+
},
793+
"return": {
794+
"isErrorCode": true
795+
}
777796
},
778797
"git_config_get_int64": {
779-
"ignore": true
798+
"args": {
799+
"out": {
800+
"cType": "int64_t *",
801+
"shouldAlloc": true
802+
}
803+
},
804+
"return": {
805+
"isErrorCode": true
806+
}
780807
},
781808
"git_config_get_mapped": {
782809
"ignore": true
@@ -814,15 +841,6 @@
814841
"git_config_init_backend": {
815842
"ignore": true
816843
},
817-
"git_config_iterator_free": {
818-
"ignore": true
819-
},
820-
"git_config_iterator_glob_new": {
821-
"ignore": true
822-
},
823-
"git_config_iterator_new": {
824-
"ignore": true
825-
},
826844
"git_config_lock": {
827845
"isAsync": true,
828846
"args": {
@@ -838,15 +856,9 @@
838856
"git_config_lookup_map_value": {
839857
"ignore": true
840858
},
841-
"git_config_multivar_iterator_new": {
842-
"ignore": true
843-
},
844859
"git_config_new": {
845860
"ignore": true
846861
},
847-
"git_config_next": {
848-
"ignore": true
849-
},
850862
"git_config_open_default": {
851863
"isAsync": true,
852864
"return": {
@@ -900,14 +912,27 @@
900912
"isErrorCode": true
901913
}
902914
},
915+
"git_config_set_multivar": {
916+
"isAsync": true,
917+
"return": {
918+
"isErrorCode": true
919+
}
920+
},
903921
"git_config_set_string": {
904922
"isAsync": true,
905923
"return": {
906924
"isErrorCode": true
907925
}
908926
},
909927
"git_config_snapshot": {
910-
"ignore": true
928+
"args": {
929+
"out": {
930+
"ownedByThis": true
931+
}
932+
},
933+
"return": {
934+
"isErrorCode": true
935+
}
911936
}
912937
},
913938
"dependencies": [
@@ -921,7 +946,69 @@
921946
"selfFreeing": true
922947
},
923948
"config_iterator": {
924-
"ignore": true
949+
"selfFreeing": true,
950+
"fields": {
951+
"backend": {
952+
"ignore": true
953+
},
954+
"flags": {
955+
"ignore": true
956+
},
957+
"free": {
958+
"ignore": true
959+
},
960+
"next": {
961+
"ignore": true
962+
}
963+
},
964+
"functions": {
965+
"git_config_iterator_free": {
966+
"ignore": true
967+
},
968+
"git_config_iterator_new": {
969+
"args": {
970+
"out": {
971+
"ownedBy": ["cfg"]
972+
}
973+
},
974+
"return": {
975+
"isErrorCode": true
976+
}
977+
},
978+
"git_config_iterator_glob_new": {
979+
"jsFunctionName": "createGlob",
980+
"args": {
981+
"out": {
982+
"ownedBy": ["cfg"]
983+
}
984+
},
985+
"return": {
986+
"isErrorCode": true
987+
}
988+
},
989+
"git_config_multivar_iterator_new": {
990+
"jsFunctionName": "createMultivar",
991+
"args": {
992+
"out": {
993+
"ownedBy": ["cfg"]
994+
}
995+
},
996+
"return": {
997+
"isErrorCode": true
998+
}
999+
},
1000+
"git_config_next": {
1001+
"jsFunctionName": "next",
1002+
"args": {
1003+
"entry": {
1004+
"ownedByThis": true
1005+
}
1006+
},
1007+
"return": {
1008+
"isErrorCode": true
1009+
}
1010+
}
1011+
}
9251012
},
9261013
"cred": {
9271014
"needsForwardDeclaration": false,

generate/input/libgit2-supplement.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,16 @@
364364
"git_annotated_commit_ref"
365365
]
366366
],
367+
[
368+
"config_iterator",
369+
[
370+
"git_config_iterator_free",
371+
"git_config_iterator_new",
372+
"git_config_iterator_glob_new",
373+
"git_config_multivar_iterator_new",
374+
"git_config_next"
375+
]
376+
],
367377
[
368378
"diff_stats",
369379
[
@@ -1153,6 +1163,15 @@
11531163
"git_annotated_commit_ref"
11541164
]
11551165
},
1166+
"config": {
1167+
"functions": [
1168+
"git_config_iterator_free",
1169+
"git_config_iterator_new",
1170+
"git_config_iterator_glob_new",
1171+
"git_config_multivar_iterator_new",
1172+
"git_config_next"
1173+
]
1174+
},
11561175
"diff": {
11571176
"functions": [
11581177
"git_diff_stats_files_changed",

0 commit comments

Comments
 (0)