Commit 1ab0523df7b6377f4162cc35c4ad71ef01bb9c15

Edward Thomson 2019-06-14T10:34:52

Merge pull request #5101 from libgit2/ethomson/opts_init Rename options initialization functions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
diff --git a/examples/describe.c b/examples/describe.c
index 966da15..2d95312 100644
--- a/examples/describe.c
+++ b/examples/describe.c
@@ -63,7 +63,7 @@ static void do_describe_single(git_repository *repo, describe_options *opts, con
 	git_object *commit;
 	git_describe_result *describe_result;
 	git_buf buf = { 0 };
-	
+
 	if (rev) {
 		check_lg2(git_revparse_single(&commit, repo, rev),
 			"Failed to lookup rev", rev);
@@ -148,8 +148,8 @@ static void describe_options_init(describe_options *opts)
 
 	opts->commits = NULL;
 	opts->commit_count = 0;
-	git_describe_init_options(&opts->describe_options, GIT_DESCRIBE_OPTIONS_VERSION);
-	git_describe_init_format_options(&opts->format_options, GIT_DESCRIBE_FORMAT_OPTIONS_VERSION);
+	git_describe_options_init(&opts->describe_options, GIT_DESCRIBE_OPTIONS_VERSION);
+	git_describe_format_options_init(&opts->format_options, GIT_DESCRIBE_FORMAT_OPTIONS_VERSION);
 }
 
 int lg2_describe(git_repository *repo, int argc, char **argv)
diff --git a/include/git2/apply.h b/include/git2/apply.h
index 91f93d7..384e117 100644
--- a/include/git2/apply.h
+++ b/include/git2/apply.h
@@ -57,7 +57,7 @@ typedef int GIT_CALLBACK(git_apply_hunk_cb)(
  * Apply options structure
  *
  * Initialize with `GIT_APPLY_OPTIONS_INIT`. Alternatively, you can
- * use `git_apply_init_options`.
+ * use `git_apply_options_init`.
  *
  * @see git_apply_to_tree, git_apply
  */
@@ -72,6 +72,8 @@ typedef struct {
 #define GIT_APPLY_OPTIONS_VERSION 1
 #define GIT_APPLY_OPTIONS_INIT {GIT_APPLY_OPTIONS_VERSION}
 
+GIT_EXTERN(int) git_apply_options_init(git_apply_options *opts, unsigned int version);
+
 /**
  * Apply a `git_diff` to a `git_tree`, and return the resulting image
  * as an index.
diff --git a/include/git2/blame.h b/include/git2/blame.h
index eef863f..73f6cf9 100644
--- a/include/git2/blame.h
+++ b/include/git2/blame.h
@@ -53,7 +53,7 @@ typedef enum {
  * Blame options structure
  *
  * Initialize with `GIT_BLAME_OPTIONS_INIT`. Alternatively, you can
- * use `git_blame_init_options`.
+ * use `git_blame_options_init`.
  *
  */
 typedef struct git_blame_options {
@@ -100,7 +100,7 @@ typedef struct git_blame_options {
  * @param version The struct version; pass `GIT_BLAME_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_blame_init_options(
+GIT_EXTERN(int) git_blame_options_init(
 	git_blame_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index e49111c..20fa6d6 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -256,7 +256,7 @@ typedef void GIT_CALLBACK(git_checkout_perfdata_cb)(
  * Checkout options structure
  *
  * Initialize with `GIT_CHECKOUT_OPTIONS_INIT`. Alternatively, you can
- * use `git_checkout_init_options`.
+ * use `git_checkout_options_init`.
  *
  */
 typedef struct git_checkout_options {
@@ -318,7 +318,7 @@ typedef struct git_checkout_options {
  * @param version The struct version; pass `GIT_CHECKOUT_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_checkout_init_options(
+GIT_EXTERN(int) git_checkout_options_init(
 	git_checkout_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/cherrypick.h b/include/git2/cherrypick.h
index ca6f720..81784b4 100644
--- a/include/git2/cherrypick.h
+++ b/include/git2/cherrypick.h
@@ -46,7 +46,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_CHERRYPICK_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_cherrypick_init_options(
+GIT_EXTERN(int) git_cherrypick_options_init(
 	git_cherrypick_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/clone.h b/include/git2/clone.h
index 790a828..2d6f687 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -97,7 +97,7 @@ typedef int GIT_CALLBACK(git_repository_create_cb)(
  * Clone options structure
  *
  * Initialize with `GIT_CLONE_OPTIONS_INIT`. Alternatively, you can
- * use `git_clone_init_options`.
+ * use `git_clone_options_init`.
  *
  */
 typedef struct git_clone_options {
@@ -178,7 +178,7 @@ typedef struct git_clone_options {
  * @param version The struct version; pass `GIT_CLONE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_clone_init_options(
+GIT_EXTERN(int) git_clone_options_init(
 	git_clone_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h
index 177efa6..09388cb 100644
--- a/include/git2/deprecated.h
+++ b/include/git2/deprecated.h
@@ -8,13 +8,29 @@
 #define INCLUDE_git_deprecated_h__
 
 #include "common.h"
+#include "blame.h"
 #include "buffer.h"
+#include "checkout.h"
+#include "cherrypick.h"
+#include "clone.h"
+#include "describe.h"
+#include "diff.h"
 #include "errors.h"
 #include "index.h"
+#include "indexer.h"
+#include "merge.h"
 #include "object.h"
+#include "proxy.h"
 #include "refs.h"
+#include "rebase.h"
 #include "remote.h"
 #include "trace.h"
+#include "repository.h"
+#include "revert.h"
+#include "stash.h"
+#include "status.h"
+#include "submodule.h"
+#include "worktree.h"
 
 /*
  * Users can avoid deprecated functions by defining `GIT_DEPRECATE_HARD`.
@@ -316,6 +332,45 @@ typedef git_push_transfer_progress_cb git_push_transfer_progress;
 
 /**@}*/
 
+/** @name Deprecated Options Initialization Functions
+ *
+ * These functions are retained for backward compatibility.  The newer
+ * versions of these functions should be preferred in all new code.
+ *
+ * There is no plan to remove these backward compatibility functions at
+ * this time.
+ */
+/**@{*/
+
+GIT_EXTERN(int) git_blame_init_options(git_blame_options *opts, unsigned int version);
+GIT_EXTERN(int) git_checkout_init_options(git_checkout_options *opts, unsigned int version);
+GIT_EXTERN(int) git_cherrypick_init_options(git_cherrypick_options *opts, unsigned int version);
+GIT_EXTERN(int) git_clone_init_options(git_clone_options *opts, unsigned int version);
+GIT_EXTERN(int) git_describe_init_options(git_describe_options *opts, unsigned int version);
+GIT_EXTERN(int) git_describe_init_format_options(git_describe_format_options *opts, unsigned int version);
+GIT_EXTERN(int) git_diff_init_options(git_diff_options *opts, unsigned int version);
+GIT_EXTERN(int) git_diff_find_init_options(git_diff_find_options *opts, unsigned int version);
+GIT_EXTERN(int) git_diff_format_email_init_options(git_diff_format_email_options *opts, unsigned int version);
+GIT_EXTERN(int) git_diff_patchid_init_options(git_diff_patchid_options *opts, unsigned int version);
+GIT_EXTERN(int) git_fetch_init_options(git_fetch_options *opts, unsigned int version);
+GIT_EXTERN(int) git_indexer_init_options(git_indexer_options *opts, unsigned int version);
+GIT_EXTERN(int) git_merge_init_options(git_merge_options *opts, unsigned int version);
+GIT_EXTERN(int) git_merge_file_init_input(git_merge_file_input *input, unsigned int version);
+GIT_EXTERN(int) git_merge_file_init_options(git_merge_file_options *opts, unsigned int version);
+GIT_EXTERN(int) git_proxy_init_options(git_proxy_options *opts, unsigned int version);
+GIT_EXTERN(int) git_push_init_options(git_push_options *opts, unsigned int version);
+GIT_EXTERN(int) git_rebase_init_options(git_rebase_options *opts, unsigned int version);
+GIT_EXTERN(int) git_remote_create_init_options(git_remote_create_options *opts, unsigned int version);
+GIT_EXTERN(int) git_repository_init_init_options(git_repository_init_options *opts, unsigned int version);
+GIT_EXTERN(int) git_revert_init_options(git_revert_options *opts, unsigned int version);
+GIT_EXTERN(int) git_stash_apply_init_options(git_stash_apply_options *opts, unsigned int version);
+GIT_EXTERN(int) git_status_init_options(git_status_options *opts, unsigned int version);
+GIT_EXTERN(int) git_submodule_update_init_options(git_submodule_update_options *opts, unsigned int version);
+GIT_EXTERN(int) git_worktree_add_init_options(git_worktree_add_options *opts, unsigned int version);
+GIT_EXTERN(int) git_worktree_prune_init_options(git_worktree_prune_options *opts, unsigned int version);
+
+/**@}*/
+
 /** @} */
 GIT_END_DECL
 
diff --git a/include/git2/describe.h b/include/git2/describe.h
index 56f119b..1d2ca14 100644
--- a/include/git2/describe.h
+++ b/include/git2/describe.h
@@ -37,7 +37,7 @@ typedef enum {
  * Describe options structure
  *
  * Initialize with `GIT_DESCRIBE_OPTIONS_INIT`. Alternatively, you can
- * use `git_describe_init_options`.
+ * use `git_describe_options_init`.
  *
  */
 typedef struct git_describe_options {
@@ -79,13 +79,13 @@ typedef struct git_describe_options {
  * @param version The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_describe_init_options(git_describe_options *opts, unsigned int version);
+GIT_EXTERN(int) git_describe_options_init(git_describe_options *opts, unsigned int version);
 
 /**
  * Describe format options structure
  *
  * Initialize with `GIT_DESCRIBE_FORMAT_OPTIONS_INIT`. Alternatively, you can
- * use `git_describe_format_init_options`.
+ * use `git_describe_format_options_init`.
  *
  */
 typedef struct {
@@ -126,7 +126,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_DESCRIBE_FORMAT_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_describe_init_format_options(git_describe_format_options *opts, unsigned int version);
+GIT_EXTERN(int) git_describe_format_options_init(git_describe_format_options *opts, unsigned int version);
 
 /**
  * A struct that stores the result of a describe operation.
diff --git a/include/git2/diff.h b/include/git2/diff.h
index b920385..c89c32f 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -119,7 +119,7 @@ typedef enum {
 
 	/** Include unreadable files in the diff */
 	GIT_DIFF_INCLUDE_UNREADABLE = (1u << 16),
-	
+
 	/** Include unreadable files in the diff */
 	GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED = (1u << 17),
 
@@ -451,7 +451,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_DIFF_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_diff_init_options(
+GIT_EXTERN(int) git_diff_options_init(
 	git_diff_options *opts,
 	unsigned int version);
 
@@ -784,7 +784,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_diff_find_init_options(
+GIT_EXTERN(int) git_diff_find_options_init(
 	git_diff_find_options *opts,
 	unsigned int version);
 
@@ -1448,7 +1448,7 @@ GIT_EXTERN(int) git_diff_commit_as_email(
  * @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_diff_format_email_init_options(
+GIT_EXTERN(int) git_diff_format_email_options_init(
 	git_diff_format_email_options *opts,
 	unsigned int version);
 
@@ -1456,7 +1456,7 @@ GIT_EXTERN(int) git_diff_format_email_init_options(
  * Patch ID options structure
  *
  * Initialize with `GIT_PATCHID_OPTIONS_INIT`. Alternatively, you can
- * use `git_patchid_init_options`.
+ * use `git_diff_patchid_options_init`.
  *
  */
 typedef struct git_diff_patchid_options {
@@ -1476,7 +1476,7 @@ typedef struct git_diff_patchid_options {
  * @param version The struct version; pass `GIT_DIFF_PATCHID_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_diff_patchid_init_options(
+GIT_EXTERN(int) git_diff_patchid_options_init(
 	git_diff_patchid_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 47c0289..1442f51 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -79,7 +79,7 @@ typedef struct git_indexer_options {
  * @param version Version of struct; pass `GIT_INDEXER_OPTIONS_VERSION`
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_indexer_init_options(
+GIT_EXTERN(int) git_indexer_options_init(
 	git_indexer_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/merge.h b/include/git2/merge.h
index 8627213..d638009 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -57,7 +57,7 @@ typedef struct {
  *        `GIT_MERGE_FILE_INPUT_VERSION` here.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_merge_file_init_input(
+GIT_EXTERN(int) git_merge_file_input_init(
 	git_merge_file_input *opts,
 	unsigned int version);
 
@@ -212,9 +212,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_MERGE_FILE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_merge_file_init_options(
-	git_merge_file_options *opts,
-	unsigned int version);
+GIT_EXTERN(int) git_merge_file_options_init(git_merge_file_options *opts, unsigned int version);
 
 /**
  * Information about file-level merging
@@ -310,9 +308,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_MERGE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_merge_init_options(
-	git_merge_options *opts,
-	unsigned int version);
+GIT_EXTERN(int) git_merge_options_init(git_merge_options *opts, unsigned int version);
 
 /**
  * The results of `git_merge_analysis` indicate the merge opportunities.
diff --git a/include/git2/proxy.h b/include/git2/proxy.h
index 5f9d27f..8fdcaa3 100644
--- a/include/git2/proxy.h
+++ b/include/git2/proxy.h
@@ -89,7 +89,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_PROXY_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_proxy_init_options(git_proxy_options *opts, unsigned int version);
+GIT_EXTERN(int) git_proxy_options_init(git_proxy_options *opts, unsigned int version);
 
 GIT_END_DECL
 
diff --git a/include/git2/rebase.h b/include/git2/rebase.h
index a97c16b..011d3e1 100644
--- a/include/git2/rebase.h
+++ b/include/git2/rebase.h
@@ -156,7 +156,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_REBASE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_rebase_init_options(
+GIT_EXTERN(int) git_rebase_options_init(
 	git_rebase_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/remote.h b/include/git2/remote.h
index f757f67..73c2482 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -56,7 +56,7 @@ typedef enum {
  * Remote creation options structure
  *
  * Initialize with `GIT_REMOTE_CREATE_OPTIONS_INIT`. Alternatively, you can
- * use `git_remote_create_init_options`.
+ * use `git_remote_create_options_init`.
  *
  */
 typedef struct git_remote_create_options {
@@ -94,7 +94,7 @@ typedef struct git_remote_create_options {
  * @param version The struct version; pass `GIT_REMOTE_CREATE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_remote_create_init_options(
+GIT_EXTERN(int) git_remote_create_options_init(
 		git_remote_create_options *opts,
 		unsigned int version);
 
@@ -700,7 +700,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_FETCH_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_fetch_init_options(
+GIT_EXTERN(int) git_fetch_options_init(
 	git_fetch_options *opts,
 	unsigned int version);
 
@@ -750,7 +750,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_PUSH_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_push_init_options(
+GIT_EXTERN(int) git_push_options_init(
 	git_push_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 04c7300..7d48e9e 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -323,7 +323,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_repository_init_init_options(
+GIT_EXTERN(int) git_repository_init_options_init(
 	git_repository_init_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/revert.h b/include/git2/revert.h
index 260ad04..331e90d 100644
--- a/include/git2/revert.h
+++ b/include/git2/revert.h
@@ -46,7 +46,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_REVERT_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_revert_init_options(
+GIT_EXTERN(int) git_revert_options_init(
 	git_revert_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/stash.h b/include/git2/stash.h
index c4dcf68..bee26f1 100644
--- a/include/git2/stash.h
+++ b/include/git2/stash.h
@@ -120,7 +120,7 @@ typedef int GIT_CALLBACK(git_stash_apply_progress_cb)(
  * Stash application options structure
  *
  * Initialize with `GIT_STASH_APPLY_OPTIONS_INIT`. Alternatively, you can
- * use `git_stash_apply_init_options`.
+ * use `git_stash_apply_options_init`.
  *
  */
 typedef struct git_stash_apply_options {
@@ -153,7 +153,7 @@ typedef struct git_stash_apply_options {
  * @param version The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_stash_apply_init_options(
+GIT_EXTERN(int) git_stash_apply_options_init(
 	git_stash_apply_options *opts, unsigned int version);
 
 /**
diff --git a/include/git2/status.h b/include/git2/status.h
index 06229ed..586d2ca 100644
--- a/include/git2/status.h
+++ b/include/git2/status.h
@@ -200,7 +200,7 @@ typedef struct {
  * @param version The struct version; pass `GIT_STATUS_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_status_init_options(
+GIT_EXTERN(int) git_status_options_init(
 	git_status_options *opts,
 	unsigned int version);
 
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index efb3b75..62f250b 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -122,7 +122,7 @@ typedef int GIT_CALLBACK(git_submodule_cb)(
  * Submodule update options structure
  *
  * Initialize with `GIT_SUBMODULE_UPDATE_OPTIONS_INIT`. Alternatively, you can
- * use `git_submodule_update_init_options`.
+ * use `git_submodule_update_options_init`.
  *
  */
 typedef struct git_submodule_update_options {
@@ -168,7 +168,7 @@ typedef struct git_submodule_update_options {
  * @param version The struct version; pass `GIT_SUBMODULE_UPDATE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_submodule_update_init_options(
+GIT_EXTERN(int) git_submodule_update_options_init(
 	git_submodule_update_options *opts, unsigned int version);
 
 /**
diff --git a/include/git2/worktree.h b/include/git2/worktree.h
index 925d85a..049511d 100644
--- a/include/git2/worktree.h
+++ b/include/git2/worktree.h
@@ -78,7 +78,7 @@ GIT_EXTERN(int) git_worktree_validate(const git_worktree *wt);
  * Worktree add options structure
  *
  * Initialize with `GIT_WORKTREE_ADD_OPTIONS_INIT`. Alternatively, you can
- * use `git_worktree_add_init_options`.
+ * use `git_worktree_add_options_init`.
  *
  */
 typedef struct git_worktree_add_options {
@@ -101,7 +101,7 @@ typedef struct git_worktree_add_options {
  * @param version The struct version; pass `GIT_WORKTREE_ADD_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_worktree_add_init_options(git_worktree_add_options *opts,
+GIT_EXTERN(int) git_worktree_add_options_init(git_worktree_add_options *opts,
 	unsigned int version);
 
 /**
@@ -174,7 +174,7 @@ GIT_EXTERN(const char *) git_worktree_name(const git_worktree *wt);
  *  is valid for the lifetime of the git_worktree.
  */
 GIT_EXTERN(const char *) git_worktree_path(const git_worktree *wt);
- 
+
 /**
  * Flags which can be passed to git_worktree_prune to alter its
  * behavior.
@@ -192,7 +192,7 @@ typedef enum {
  * Worktree prune options structure
  *
  * Initialize with `GIT_WORKTREE_PRUNE_OPTIONS_INIT`. Alternatively, you can
- * use `git_worktree_prune_init_options`.
+ * use `git_worktree_prune_options_init`.
  *
  */
 typedef struct git_worktree_prune_options {
@@ -214,7 +214,7 @@ typedef struct git_worktree_prune_options {
  * @param version The struct version; pass `GIT_WORKTREE_PRUNE_OPTIONS_VERSION`.
  * @return Zero on success; -1 on failure.
  */
-GIT_EXTERN(int) git_worktree_prune_init_options(
+GIT_EXTERN(int) git_worktree_prune_options_init(
 	git_worktree_prune_options *opts,
 	unsigned int version);
 
diff --git a/src/apply.c b/src/apply.c
index 156221f..fdafa66 100644
--- a/src/apply.c
+++ b/src/apply.c
@@ -745,6 +745,13 @@ done:
 	return error;
 }
 
+int git_apply_options_init(git_apply_options *opts, unsigned int version)
+{
+	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
+		opts, version, git_apply_options, GIT_APPLY_OPTIONS_INIT);
+	return 0;
+}
+
 /*
  * Handle the three application options ("locations"):
  *
diff --git a/src/blame.c b/src/blame.c
index be10c15..6381fae 100644
--- a/src/blame.c
+++ b/src/blame.c
@@ -524,9 +524,14 @@ int git_blame_buffer(
 	return 0;
 }
 
-int git_blame_init_options(git_blame_options *opts, unsigned int version)
+int git_blame_options_init(git_blame_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_blame_options, GIT_BLAME_OPTIONS_INIT);
 	return 0;
 }
+
+int git_blame_init_options(git_blame_options *opts, unsigned int version)
+{
+	return git_blame_options_init(opts, version);
+}
diff --git a/src/checkout.c b/src/checkout.c
index 35862bd..143b5f5 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -2791,9 +2791,14 @@ int git_checkout_head(
 	return git_checkout_tree(repo, NULL, opts);
 }
 
-int git_checkout_init_options(git_checkout_options *opts, unsigned int version)
+int git_checkout_options_init(git_checkout_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_checkout_options, GIT_CHECKOUT_OPTIONS_INIT);
 	return 0;
 }
+
+int git_checkout_init_options(git_checkout_options *opts, unsigned int version)
+{
+	return git_checkout_options_init(opts, version);
+}
diff --git a/src/cherrypick.c b/src/cherrypick.c
index 26935c6..d5ba74c 100644
--- a/src/cherrypick.c
+++ b/src/cherrypick.c
@@ -221,10 +221,16 @@ done:
 	return error;
 }
 
-int git_cherrypick_init_options(
+int git_cherrypick_options_init(
 	git_cherrypick_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_cherrypick_options, GIT_CHERRYPICK_OPTIONS_INIT);
 	return 0;
 }
+
+int git_cherrypick_init_options(
+	git_cherrypick_options *opts, unsigned int version)
+{
+	return git_cherrypick_options_init(opts, version);
+}
diff --git a/src/clone.c b/src/clone.c
index 8688da9..4e2dd50 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -455,13 +455,18 @@ int git_clone(
 	return error;
 }
 
-int git_clone_init_options(git_clone_options *opts, unsigned int version)
+int git_clone_options_init(git_clone_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_clone_options, GIT_CLONE_OPTIONS_INIT);
 	return 0;
 }
 
+int git_clone_init_options(git_clone_options *opts, unsigned int version)
+{
+	return git_clone_options_init(opts, version);
+}
+
 static bool can_link(const char *src, const char *dst, int link)
 {
 #ifdef GIT_WIN32
diff --git a/src/describe.c b/src/describe.c
index 943fa55..7f71519 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -759,7 +759,7 @@ static int normalize_format_options(
 	const git_describe_format_options *src)
 {
 	if (!src) {
-		git_describe_init_format_options(dst, GIT_DESCRIBE_FORMAT_OPTIONS_VERSION);
+		git_describe_format_options_init(dst, GIT_DESCRIBE_FORMAT_OPTIONS_VERSION);
 		return 0;
 	}
 
@@ -868,16 +868,26 @@ void git_describe_result_free(git_describe_result *result)
 	git__free(result);
 }
 
-int git_describe_init_options(git_describe_options *opts, unsigned int version)
+int git_describe_options_init(git_describe_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_describe_options, GIT_DESCRIBE_OPTIONS_INIT);
 	return 0;
 }
 
-int git_describe_init_format_options(git_describe_format_options *opts, unsigned int version)
+int git_describe_init_options(git_describe_options *opts, unsigned int version)
+{
+	return git_describe_options_init(opts, version);
+}
+
+int git_describe_format_options_init(git_describe_format_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_describe_format_options, GIT_DESCRIBE_FORMAT_OPTIONS_INIT);
 	return 0;
 }
+
+int git_describe_init_format_options(git_describe_format_options *opts, unsigned int version)
+{
+	return git_describe_format_options_init(opts, version);
+}
diff --git a/src/diff.c b/src/diff.c
index d2e129d..6c25921 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -350,14 +350,19 @@ int git_diff_commit_as_email(
 	return error;
 }
 
-int git_diff_init_options(git_diff_options *opts, unsigned int version)
+int git_diff_options_init(git_diff_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_diff_options, GIT_DIFF_OPTIONS_INIT);
 	return 0;
 }
 
-int git_diff_find_init_options(
+int git_diff_init_options(git_diff_options *opts, unsigned int version)
+{
+	return git_diff_options_init(opts, version);
+}
+
+int git_diff_find_options_init(
 	git_diff_find_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
@@ -365,7 +370,13 @@ int git_diff_find_init_options(
 	return 0;
 }
 
-int git_diff_format_email_init_options(
+int git_diff_find_init_options(
+	git_diff_find_options *opts, unsigned int version)
+{
+	return git_diff_find_options_init(opts, version);
+}
+
+int git_diff_format_email_options_init(
 	git_diff_format_email_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
@@ -374,6 +385,12 @@ int git_diff_format_email_init_options(
 	return 0;
 }
 
+int git_diff_format_email_init_options(
+	git_diff_format_email_options *opts, unsigned int version)
+{
+	return git_diff_format_email_options_init(opts, version);
+}
+
 static int flush_hunk(git_oid *result, git_hash_ctx *ctx)
 {
 	git_oid hash;
@@ -481,7 +498,7 @@ out:
 	return error;
 }
 
-int git_diff_patchid_init_options(git_diff_patchid_options *opts, unsigned int version)
+int git_diff_patchid_options_init(git_diff_patchid_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_diff_patchid_options, GIT_DIFF_PATCHID_OPTIONS_INIT);
diff --git a/src/diff_parse.c b/src/diff_parse.c
index b4c76a3..098e56f 100644
--- a/src/diff_parse.c
+++ b/src/diff_parse.c
@@ -45,7 +45,7 @@ static git_diff_parsed *diff_parsed_alloc(void)
 	diff->base.patch_fn = git_patch_parsed_from_diff;
 	diff->base.free_fn = diff_parsed_free;
 
-	if (git_diff_init_options(&diff->base.opts, GIT_DIFF_OPTIONS_VERSION) < 0) {
+	if (git_diff_options_init(&diff->base.opts, GIT_DIFF_OPTIONS_VERSION) < 0) {
 		git__free(diff);
 		return NULL;
 	}
diff --git a/src/fetch.c b/src/fetch.c
index ea499dd..f2f3131 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -148,9 +148,14 @@ int git_fetch_download_pack(git_remote *remote, const git_remote_callbacks *call
 	return t->download_pack(t, remote->repo, &remote->stats, progress, payload);
 }
 
-int git_fetch_init_options(git_fetch_options *opts, unsigned int version)
+int git_fetch_options_init(git_fetch_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_fetch_options, GIT_FETCH_OPTIONS_INIT);
 	return 0;
 }
+
+int git_fetch_init_options(git_fetch_options *opts, unsigned int version)
+{
+	return git_fetch_options_init(opts, version);
+}
diff --git a/src/indexer.c b/src/indexer.c
index 0f6249a..e7b3483 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -116,13 +116,18 @@ static int objects_cmp(const void *a, const void *b)
 	return git_oid__cmp(&entrya->oid, &entryb->oid);
 }
 
-int git_indexer_init_options(git_indexer_options *opts, unsigned int version)
+int git_indexer_options_init(git_indexer_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_indexer_options, GIT_INDEXER_OPTIONS_INIT);
 	return 0;
 }
 
+int git_indexer_init_options(git_indexer_options *opts, unsigned int version)
+{
+	return git_indexer_options_init(opts, version);
+}
+
 int git_indexer_new(
 		git_indexer **out,
 		const char *prefix,
diff --git a/src/merge.c b/src/merge.c
index c054ad8..ec34ccb 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -3322,24 +3322,40 @@ done:
 	return error;
 }
 
-int git_merge_init_options(git_merge_options *opts, unsigned int version)
+int git_merge_options_init(git_merge_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_merge_options, GIT_MERGE_OPTIONS_INIT);
 	return 0;
 }
 
-int git_merge_file_init_input(git_merge_file_input *input, unsigned int version)
+int git_merge_init_options(git_merge_options *opts, unsigned int version)
+{
+	return git_merge_options_init(opts, version);
+}
+
+int git_merge_file_input_init(git_merge_file_input *input, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		input, version, git_merge_file_input, GIT_MERGE_FILE_INPUT_INIT);
 	return 0;
 }
 
-int git_merge_file_init_options(
+int git_merge_file_init_input(git_merge_file_input *input, unsigned int version)
+{
+	return git_merge_file_input_init(input, version);
+}
+
+int git_merge_file_options_init(
 	git_merge_file_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_merge_file_options, GIT_MERGE_FILE_OPTIONS_INIT);
 	return 0;
 }
+
+int git_merge_file_init_options(
+	git_merge_file_options *opts, unsigned int version)
+{
+	return git_merge_file_options_init(opts, version);
+}
diff --git a/src/proxy.c b/src/proxy.c
index d025586..367c4b1 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -9,17 +9,22 @@
 
 #include "git2/proxy.h"
 
-int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
+int git_proxy_options_init(git_proxy_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_proxy_options, GIT_PROXY_OPTIONS_INIT);
 	return 0;
 }
 
+int git_proxy_init_options(git_proxy_options *opts, unsigned int version)
+{
+	return git_proxy_options_init(opts, version);
+}
+
 int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src)
 {
 	if (!src) {
-		git_proxy_init_options(tgt, GIT_PROXY_OPTIONS_VERSION);
+		git_proxy_options_init(tgt, GIT_PROXY_OPTIONS_VERSION);
 		return 0;
 	}
 
diff --git a/src/push.c b/src/push.c
index 9d09e18..9770771 100644
--- a/src/push.c
+++ b/src/push.c
@@ -547,9 +547,14 @@ void git_push_free(git_push *push)
 	git__free(push);
 }
 
-int git_push_init_options(git_push_options *opts, unsigned int version)
+int git_push_options_init(git_push_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_push_options, GIT_PUSH_OPTIONS_INIT);
 	return 0;
 }
+
+int git_push_init_options(git_push_options *opts, unsigned int version)
+{
+	return git_push_options_init(opts, version);
+}
diff --git a/src/rebase.c b/src/rebase.c
index a68313f..6de7180 100644
--- a/src/rebase.c
+++ b/src/rebase.c
@@ -268,7 +268,7 @@ static int rebase_alloc(git_rebase **out, const git_rebase_options *rebase_opts)
 	if (rebase_opts)
 		memcpy(&rebase->options, rebase_opts, sizeof(git_rebase_options));
 	else
-		git_rebase_init_options(&rebase->options, GIT_REBASE_OPTIONS_VERSION);
+		git_rebase_options_init(&rebase->options, GIT_REBASE_OPTIONS_VERSION);
 
 	if (rebase_opts && rebase_opts->rewrite_notes_ref) {
 		rebase->options.rewrite_notes_ref = git__strdup(rebase_opts->rewrite_notes_ref);
@@ -493,13 +493,18 @@ static int rebase_setupfiles(git_rebase *rebase)
 	return rebase_setupfiles_merge(rebase);
 }
 
-int git_rebase_init_options(git_rebase_options *opts, unsigned int version)
+int git_rebase_options_init(git_rebase_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_rebase_options, GIT_REBASE_OPTIONS_INIT);
 	return 0;
 }
 
+int git_rebase_init_options(git_rebase_options *opts, unsigned int version)
+{
+	return git_rebase_options_init(opts, version);
+}
+
 static int rebase_ensure_not_in_progress(git_repository *repo)
 {
 	int error;
diff --git a/src/remote.c b/src/remote.c
index 3cea790..8e8dda8 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -217,13 +217,18 @@ static int ensure_remote_doesnot_exist(git_repository *repo, const char *name)
 	return GIT_EEXISTS;
 }
 
-int git_remote_create_init_options(git_remote_create_options *opts, unsigned int version)
+int git_remote_create_options_init(git_remote_create_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_remote_create_options, GIT_REMOTE_CREATE_OPTIONS_INIT);
 	return 0;
 }
 
+int git_remote_create_init_options(git_remote_create_options *opts, unsigned int version)
+{
+	return git_remote_create_options_init(opts, version);
+}
+
 int git_remote_create_with_opts(git_remote **out, const char *url, const git_remote_create_options *opts)
 {
 	git_remote *remote = NULL;
diff --git a/src/repository.c b/src/repository.c
index 8b90028..d3c7bab 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -2870,7 +2870,7 @@ int git_repository_is_shallow(git_repository *repo)
 	return st.st_size == 0 ? 0 : 1;
 }
 
-int git_repository_init_init_options(
+int git_repository_init_options_init(
 	git_repository_init_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
@@ -2879,6 +2879,12 @@ int git_repository_init_init_options(
 	return 0;
 }
 
+int git_repository_init_init_options(
+	git_repository_init_options *opts, unsigned int version)
+{
+	return git_repository_init_options_init(opts, version);
+}
+
 int git_repository_ident(const char **name, const char **email, const git_repository *repo)
 {
 	*name = repo->ident_name;
diff --git a/src/revert.c b/src/revert.c
index eb71a68..b8334c3 100644
--- a/src/revert.c
+++ b/src/revert.c
@@ -224,9 +224,14 @@ done:
 	return error;
 }
 
-int git_revert_init_options(git_revert_options *opts, unsigned int version)
+int git_revert_options_init(git_revert_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_revert_options, GIT_REVERT_OPTIONS_INIT);
 	return 0;
 }
+
+int git_revert_init_options(git_revert_options *opts, unsigned int version)
+{
+	return git_revert_options_init(opts, version);
+}
diff --git a/src/stash.c b/src/stash.c
index c332d93..c46830b 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -794,13 +794,18 @@ static void normalize_apply_options(
 		opts->checkout_options.their_label = "Stashed changes";
 }
 
-int git_stash_apply_init_options(git_stash_apply_options *opts, unsigned int version)
+int git_stash_apply_options_init(git_stash_apply_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_stash_apply_options, GIT_STASH_APPLY_OPTIONS_INIT);
 	return 0;
 }
 
+int git_stash_apply_init_options(git_stash_apply_options *opts, unsigned int version)
+{
+	return git_stash_apply_options_init(opts, version);
+}
+
 #define NOTIFY_PROGRESS(opts, progress_type)				\
 	do {								\
 		if ((opts).progress_cb &&				\
diff --git a/src/status.c b/src/status.c
index ef32a0a..8d3185f 100644
--- a/src/status.c
+++ b/src/status.c
@@ -280,7 +280,7 @@ int git_status_list_new(
 	if ((error = git_repository__ensure_not_bare(repo, "status")) < 0 ||
 		(error = git_repository_index(&index, repo)) < 0)
 		return error;
-	
+
 	if (opts != NULL && opts->baseline != NULL) {
 		head = opts->baseline;
 	} else {
@@ -540,13 +540,18 @@ int git_status_should_ignore(
 	return git_ignore_path_is_ignored(ignored, repo, path);
 }
 
-int git_status_init_options(git_status_options *opts, unsigned int version)
+int git_status_options_init(git_status_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_status_options, GIT_STATUS_OPTIONS_INIT);
 	return 0;
 }
 
+int git_status_init_options(git_status_options *opts, unsigned int version)
+{
+	return git_status_options_init(opts, version);
+}
+
 int git_status_list_get_perfdata(
 	git_diff_perfdata *out, const git_status_list *status)
 {
diff --git a/src/submodule.c b/src/submodule.c
index c54b9df..cb11a7c 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -1174,13 +1174,18 @@ static int git_submodule_update_repo_init_cb(
 	return submodule_repo_create(out, sm->repo, path);
 }
 
-int git_submodule_update_init_options(git_submodule_update_options *opts, unsigned int version)
+int git_submodule_update_options_init(git_submodule_update_options *opts, unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(
 		opts, version, git_submodule_update_options, GIT_SUBMODULE_UPDATE_OPTIONS_INIT);
 	return 0;
 }
 
+int git_submodule_update_init_options(git_submodule_update_options *opts, unsigned int version)
+{
+	return git_submodule_update_options_init(opts, version);
+}
+
 int git_submodule_update(git_submodule *sm, int init, git_submodule_update_options *_update_options)
 {
 	int error;
diff --git a/src/transports/http.c b/src/transports/http.c
index f1e048e..d727851 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -757,7 +757,7 @@ static int load_proxy_config(http_subtransport *t)
 		git__free(t->proxy_url);
 		t->proxy_url = NULL;
 
-		git_proxy_init_options(&t->proxy_opts, GIT_PROXY_OPTIONS_VERSION);
+		git_proxy_options_init(&t->proxy_opts, GIT_PROXY_OPTIONS_VERSION);
 
 		if ((error = git_remote__get_http_proxy(t->owner->owner,
 			!strcmp(t->server.url.scheme, "https"), &t->proxy_url)) < 0)
diff --git a/src/worktree.c b/src/worktree.c
index fdaa905..2dc7244 100644
--- a/src/worktree.c
+++ b/src/worktree.c
@@ -260,7 +260,7 @@ int git_worktree_validate(const git_worktree *wt)
 	return 0;
 }
 
-int git_worktree_add_init_options(git_worktree_add_options *opts,
+int git_worktree_add_options_init(git_worktree_add_options *opts,
 	unsigned int version)
 {
 	GIT_INIT_STRUCTURE_FROM_TEMPLATE(opts, version,
@@ -268,6 +268,12 @@ int git_worktree_add_init_options(git_worktree_add_options *opts,
 	return 0;
 }
 
+int git_worktree_add_init_options(git_worktree_add_options *opts,
+	unsigned int version)
+{
+	return git_worktree_add_options_init(opts, version);
+}
+
 int git_worktree_add(git_worktree **out, git_repository *repo,
 	const char *name, const char *worktree,
 	const git_worktree_add_options *opts)
@@ -478,7 +484,7 @@ const char *git_worktree_path(const git_worktree *wt)
 	return wt->worktree_path;
 }
 
-int git_worktree_prune_init_options(
+int git_worktree_prune_options_init(
 	git_worktree_prune_options *opts,
 	unsigned int version)
 {
@@ -487,6 +493,12 @@ int git_worktree_prune_init_options(
 	return 0;
 }
 
+int git_worktree_pruneinit_options(git_worktree_prune_options *opts,
+	unsigned int version)
+{
+	return git_worktree_prune_options_init(opts, version);
+}
+
 int git_worktree_is_prunable(git_worktree *wt,
 	git_worktree_prune_options *opts)
 {
diff --git a/tests/checkout/icase.c b/tests/checkout/icase.c
index e6c640e..b444878 100644
--- a/tests/checkout/icase.c
+++ b/tests/checkout/icase.c
@@ -33,7 +33,7 @@ void test_checkout_icase__initialize(void)
 	cl_git_pass(git_reference_name_to_id(&id, repo, "refs/heads/dir"));
 	cl_git_pass(git_object_lookup(&obj, repo, &id, GIT_OBJECT_ANY));
 
-	git_checkout_init_options(&checkout_opts, GIT_CHECKOUT_OPTIONS_VERSION);
+	git_checkout_options_init(&checkout_opts, GIT_CHECKOUT_OPTIONS_VERSION);
 	checkout_opts.checkout_strategy = GIT_CHECKOUT_NONE;
 }
 
diff --git a/tests/core/structinit.c b/tests/core/structinit.c
index 8feba86..f9da823 100644
--- a/tests/core/structinit.c
+++ b/tests/core/structinit.c
@@ -72,30 +72,35 @@ void test_core_structinit__compare(void)
 	clar__skip();
 #endif
 
+	/* apply */
+	CHECK_MACRO_FUNC_INIT_EQUAL( \
+		git_apply_options, GIT_APPLY_OPTIONS_VERSION, \
+		GIT_APPLY_OPTIONS_INIT, git_apply_options_init);
+
 	/* blame */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_blame_options, GIT_BLAME_OPTIONS_VERSION, \
-		GIT_BLAME_OPTIONS_INIT, git_blame_init_options);
+		GIT_BLAME_OPTIONS_INIT, git_blame_options_init);
 
 	/* checkout */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_checkout_options, GIT_CHECKOUT_OPTIONS_VERSION, \
-		GIT_CHECKOUT_OPTIONS_INIT, git_checkout_init_options);
+		GIT_CHECKOUT_OPTIONS_INIT, git_checkout_options_init);
 
 	/* clone */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_clone_options, GIT_CLONE_OPTIONS_VERSION, \
-		GIT_CLONE_OPTIONS_INIT, git_clone_init_options);
+		GIT_CLONE_OPTIONS_INIT, git_clone_options_init);
 
 	/* diff */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_diff_options, GIT_DIFF_OPTIONS_VERSION, \
-		GIT_DIFF_OPTIONS_INIT, git_diff_init_options);
+		GIT_DIFF_OPTIONS_INIT, git_diff_options_init);
 
 	/* diff_find */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_diff_find_options, GIT_DIFF_FIND_OPTIONS_VERSION, \
-		GIT_DIFF_FIND_OPTIONS_INIT, git_diff_find_init_options);
+		GIT_DIFF_FIND_OPTIONS_INIT, git_diff_find_options_init);
 
 	/* filter */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
@@ -105,22 +110,22 @@ void test_core_structinit__compare(void)
 	/* merge_file_input */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_merge_file_input, GIT_MERGE_FILE_INPUT_VERSION, \
-		GIT_MERGE_FILE_INPUT_INIT, git_merge_file_init_input);
+		GIT_MERGE_FILE_INPUT_INIT, git_merge_file_input_init);
 
 	/* merge_file */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_merge_file_options, GIT_MERGE_FILE_OPTIONS_VERSION, \
-		GIT_MERGE_FILE_OPTIONS_INIT, git_merge_file_init_options);
+		GIT_MERGE_FILE_OPTIONS_INIT, git_merge_file_options_init);
 
 	/* merge_tree */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_merge_options, GIT_MERGE_OPTIONS_VERSION, \
-		GIT_MERGE_OPTIONS_INIT, git_merge_init_options);
+		GIT_MERGE_OPTIONS_INIT, git_merge_options_init);
 
 	/* push */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_push_options, GIT_PUSH_OPTIONS_VERSION, \
-		GIT_PUSH_OPTIONS_INIT, git_push_init_options);
+		GIT_PUSH_OPTIONS_INIT, git_push_options_init);
 
 	/* remote */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
@@ -130,22 +135,22 @@ void test_core_structinit__compare(void)
 	/* repository_init */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_repository_init_options, GIT_REPOSITORY_INIT_OPTIONS_VERSION, \
-		GIT_REPOSITORY_INIT_OPTIONS_INIT, git_repository_init_init_options);
+		GIT_REPOSITORY_INIT_OPTIONS_INIT, git_repository_init_options_init);
 
 	/* revert */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_revert_options, GIT_REVERT_OPTIONS_VERSION, \
-		GIT_REVERT_OPTIONS_INIT, git_revert_init_options);
+		GIT_REVERT_OPTIONS_INIT, git_revert_options_init);
 
 	/* stash apply */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_stash_apply_options, GIT_STASH_APPLY_OPTIONS_VERSION, \
-		GIT_STASH_APPLY_OPTIONS_INIT, git_stash_apply_init_options);
+		GIT_STASH_APPLY_OPTIONS_INIT, git_stash_apply_options_init);
 
 	/* status */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_status_options, GIT_STATUS_OPTIONS_VERSION, \
-		GIT_STATUS_OPTIONS_INIT, git_status_init_options);
+		GIT_STATUS_OPTIONS_INIT, git_status_options_init);
 
 	/* transport */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
@@ -170,14 +175,14 @@ void test_core_structinit__compare(void)
 	/* submodule update */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_submodule_update_options, GIT_SUBMODULE_UPDATE_OPTIONS_VERSION, \
-		GIT_SUBMODULE_UPDATE_OPTIONS_INIT, git_submodule_update_init_options);
+		GIT_SUBMODULE_UPDATE_OPTIONS_INIT, git_submodule_update_options_init);
 
 	/* submodule update */
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_proxy_options, GIT_PROXY_OPTIONS_VERSION, \
-		GIT_PROXY_OPTIONS_INIT, git_proxy_init_options);
+		GIT_PROXY_OPTIONS_INIT, git_proxy_options_init);
 
 	CHECK_MACRO_FUNC_INIT_EQUAL( \
 		git_diff_patchid_options, GIT_DIFF_PATCHID_OPTIONS_VERSION, \
-		GIT_DIFF_PATCHID_OPTIONS_INIT, git_diff_patchid_init_options);
+		GIT_DIFF_PATCHID_OPTIONS_INIT, git_diff_patchid_options_init);
 }
diff --git a/tests/diff/blob.c b/tests/diff/blob.c
index 37898ad..bebe6db 100644
--- a/tests/diff/blob.c
+++ b/tests/diff/blob.c
@@ -39,7 +39,7 @@ void test_diff_blob__initialize(void)
 
 	g_repo = cl_git_sandbox_init("attr");
 
-	cl_git_pass(git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION));
+	cl_git_pass(git_diff_options_init(&opts, GIT_DIFF_OPTIONS_VERSION));
 	opts.context_lines = 1;
 
 	memset(&expected, 0, sizeof(expected));
diff --git a/tests/diff/patch.c b/tests/diff/patch.c
index bc7976f..7eb3536 100644
--- a/tests/diff/patch.c
+++ b/tests/diff/patch.c
@@ -692,7 +692,7 @@ void test_diff_patch__can_strip_bad_utf8(void)
 	git_patch *patch;
 	git_buf buf = GIT_BUF_INIT;
 
-	cl_git_pass(git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION));
+	cl_git_pass(git_diff_options_init(&opts, GIT_DIFF_OPTIONS_VERSION));
 
 	cl_git_pass(git_patch_from_buffers(&patch, a, strlen(a), NULL, b, strlen(b), NULL, &opts));
 	cl_git_pass(git_patch_to_buf(&buf, patch));
diff --git a/tests/diff/tree.c b/tests/diff/tree.c
index a3b00ec..2359a83 100644
--- a/tests/diff/tree.c
+++ b/tests/diff/tree.c
@@ -9,7 +9,7 @@ static diff_expects expect;
 
 void test_diff_tree__initialize(void)
 {
-	cl_git_pass(git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION));
+	cl_git_pass(git_diff_options_init(&opts, GIT_DIFF_OPTIONS_VERSION));
 
 	memset(&expect, 0, sizeof(expect));
 
@@ -472,7 +472,7 @@ void test_diff_tree__diff_configs(void)
 
 	cl_git_pass(git_diff_tree_to_tree(&diff, g_repo, a, b, NULL));
 
-	cl_git_pass(git_diff_foreach(diff, 
+	cl_git_pass(git_diff_foreach(diff,
 		diff_file_cb, diff_binary_cb, diff_hunk_cb, diff_line_cb, &expect));
 
 	cl_assert_equal_i(2, expect.files);