git_checkout_opts -> git_checkout_options
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
diff --git a/examples/network/clone.c b/examples/network/clone.c
index a982c13..182d1c3 100644
--- a/examples/network/clone.c
+++ b/examples/network/clone.c
@@ -62,7 +62,7 @@ int do_clone(git_repository *repo, int argc, char **argv)
progress_data pd = {{0}};
git_repository *cloned_repo = NULL;
git_clone_options clone_opts = GIT_CLONE_OPTIONS_INIT;
- git_checkout_opts checkout_opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
const char *url = argv[1];
const char *path = argv[2];
int error;
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 702e088..69addb7 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -225,12 +225,12 @@ typedef void (*git_checkout_progress_cb)(
/**
* Checkout options structure
*
- * Zero out for defaults. Initialize with `GIT_CHECKOUT_OPTS_INIT` macro to
+ * Zero out for defaults. Initialize with `GIT_CHECKOUT_OPTIONS_INIT` macro to
* correctly set the `version` field. E.g.
*
- * git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ * git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
*/
-typedef struct git_checkout_opts {
+typedef struct git_checkout_options {
unsigned int version;
unsigned int checkout_strategy; /** default will be a dry run */
@@ -261,22 +261,22 @@ typedef struct git_checkout_opts {
const char *ancestor_label; /** the name of the common ancestor side of conflicts */
const char *our_label; /** the name of the "our" side of conflicts */
const char *their_label; /** the name of the "their" side of conflicts */
-} git_checkout_opts;
+} git_checkout_options;
-#define GIT_CHECKOUT_OPTS_VERSION 1
-#define GIT_CHECKOUT_OPTS_INIT {GIT_CHECKOUT_OPTS_VERSION}
+#define GIT_CHECKOUT_OPTIONS_VERSION 1
+#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION}
/**
-* Initializes a `git_checkout_opts` with default values. Equivalent to
-* creating an instance with GIT_CHECKOUT_OPTS_INIT.
+* Initializes a `git_checkout_options` with default values. Equivalent to
+* creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
*
-* @param opts the `git_checkout_opts` instance to initialize.
+* @param opts the `git_checkout_options` instance to initialize.
* @param version the version of the struct; you should pass
-* `GIT_CHECKOUT_OPTS_VERSION` here.
+* `GIT_CHECKOUT_OPTIONS_VERSION` here.
* @return Zero on success; -1 on failure.
*/
GIT_EXTERN(int) git_checkout_init_opts(
- git_checkout_opts* opts,
+ git_checkout_options* opts,
int version);
/**
@@ -291,7 +291,7 @@ GIT_EXTERN(int) git_checkout_init_opts(
*/
GIT_EXTERN(int) git_checkout_head(
git_repository *repo,
- const git_checkout_opts *opts);
+ const git_checkout_options *opts);
/**
* Updates files in the working tree to match the content of the index.
@@ -305,7 +305,7 @@ GIT_EXTERN(int) git_checkout_head(
GIT_EXTERN(int) git_checkout_index(
git_repository *repo,
git_index *index,
- const git_checkout_opts *opts);
+ const git_checkout_options *opts);
/**
* Updates files in the index and working tree to match the content of the
@@ -321,7 +321,7 @@ GIT_EXTERN(int) git_checkout_index(
GIT_EXTERN(int) git_checkout_tree(
git_repository *repo,
const git_object *treeish,
- const git_checkout_opts *opts);
+ const git_checkout_options *opts);
/** @} */
GIT_END_DECL
diff --git a/include/git2/clone.h b/include/git2/clone.h
index 98c6fb7..20be1a1 100644
--- a/include/git2/clone.h
+++ b/include/git2/clone.h
@@ -52,7 +52,7 @@ GIT_BEGIN_DECL
typedef struct git_clone_options {
unsigned int version;
- git_checkout_opts checkout_opts;
+ git_checkout_options checkout_opts;
git_remote_callbacks remote_callbacks;
int bare;
@@ -63,7 +63,7 @@ typedef struct git_clone_options {
} git_clone_options;
#define GIT_CLONE_OPTIONS_VERSION 1
-#define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTS_VERSION, GIT_CHECKOUT_SAFE_CREATE}, GIT_REMOTE_CALLBACKS_INIT}
+#define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTIONS_VERSION, GIT_CHECKOUT_SAFE_CREATE}, GIT_REMOTE_CALLBACKS_INIT}
/**
* Initializes a `git_clone_options` with default values. Equivalent to
@@ -120,7 +120,7 @@ GIT_EXTERN(int) git_clone(
GIT_EXTERN(int) git_clone_into(
git_repository *repo,
git_remote *remote,
- const git_checkout_opts *co_opts,
+ const git_checkout_options *co_opts,
const char *branch,
const git_signature *signature);
diff --git a/include/git2/merge.h b/include/git2/merge.h
index dc89a04..3563f35 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -150,11 +150,11 @@ typedef struct {
git_merge_tree_opts merge_tree_opts;
/** Options for writing the merge result to the working directory. */
- git_checkout_opts checkout_opts;
+ git_checkout_options checkout_opts;
} git_merge_opts;
#define GIT_MERGE_OPTS_VERSION 1
-#define GIT_MERGE_OPTS_INIT {GIT_MERGE_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTS_INIT}
+#define GIT_MERGE_OPTS_INIT {GIT_MERGE_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
/**
* Initializes a `git_merge_opts` with default values. Equivalent to creating
diff --git a/include/git2/revert.h b/include/git2/revert.h
index 088bda9..fcdf2a2 100644
--- a/include/git2/revert.h
+++ b/include/git2/revert.h
@@ -27,11 +27,11 @@ typedef struct {
unsigned int mainline;
git_merge_tree_opts merge_tree_opts;
- git_checkout_opts checkout_opts;
+ git_checkout_options checkout_opts;
} git_revert_opts;
#define GIT_REVERT_OPTS_VERSION 1
-#define GIT_REVERT_OPTS_INIT {GIT_REVERT_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTS_INIT}
+#define GIT_REVERT_OPTS_INIT {GIT_REVERT_OPTS_VERSION, 0, GIT_MERGE_TREE_OPTS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
/**
* Initializes a `git_revert_opts` with default values. Equivalent to
diff --git a/src/checkout.c b/src/checkout.c
index 4ef8da0..5dd4ec7 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -47,7 +47,7 @@ enum {
typedef struct {
git_repository *repo;
git_diff *diff;
- git_checkout_opts opts;
+ git_checkout_options opts;
bool opts_free_baseline;
char *pfx;
git_index *index;
@@ -1144,7 +1144,7 @@ static int blob_content_to_file(
const char *path,
const char * hint_path,
mode_t entry_filemode,
- git_checkout_opts *opts)
+ git_checkout_options *opts)
{
int error = 0;
mode_t file_mode = opts->file_mode ? opts->file_mode : entry_filemode;
@@ -1856,7 +1856,7 @@ static void checkout_data_clear(checkout_data *data)
static int checkout_data_init(
checkout_data *data,
git_iterator *target,
- const git_checkout_opts *proposed)
+ const git_checkout_options *proposed)
{
int error = 0;
git_repository *repo = git_iterator_owner(target);
@@ -1875,12 +1875,12 @@ static int checkout_data_init(
data->repo = repo;
GITERR_CHECK_VERSION(
- proposed, GIT_CHECKOUT_OPTS_VERSION, "git_checkout_opts");
+ proposed, GIT_CHECKOUT_OPTIONS_VERSION, "git_checkout_options");
if (!proposed)
- GIT_INIT_STRUCTURE(&data->opts, GIT_CHECKOUT_OPTS_VERSION);
+ GIT_INIT_STRUCTURE(&data->opts, GIT_CHECKOUT_OPTIONS_VERSION);
else
- memmove(&data->opts, proposed, sizeof(git_checkout_opts));
+ memmove(&data->opts, proposed, sizeof(git_checkout_options));
if (!data->opts.target_directory)
data->opts.target_directory = git_repository_workdir(repo);
@@ -2000,7 +2000,7 @@ cleanup:
int git_checkout_iterator(
git_iterator *target,
- const git_checkout_opts *opts)
+ const git_checkout_options *opts)
{
int error = 0;
git_iterator *baseline = NULL, *workdir = NULL;
@@ -2106,7 +2106,7 @@ cleanup:
int git_checkout_index(
git_repository *repo,
git_index *index,
- const git_checkout_opts *opts)
+ const git_checkout_options *opts)
{
int error;
git_iterator *index_i;
@@ -2141,7 +2141,7 @@ int git_checkout_index(
int git_checkout_tree(
git_repository *repo,
const git_object *treeish,
- const git_checkout_opts *opts)
+ const git_checkout_options *opts)
{
int error;
git_tree *tree = NULL;
@@ -2189,19 +2189,19 @@ int git_checkout_tree(
int git_checkout_head(
git_repository *repo,
- const git_checkout_opts *opts)
+ const git_checkout_options *opts)
{
assert(repo);
return git_checkout_tree(repo, NULL, opts);
}
-int git_checkout_init_opts(git_checkout_opts* opts, int version)
+int git_checkout_init_opts(git_checkout_options* opts, int version)
{
- if (version != GIT_CHECKOUT_OPTS_VERSION) {
- giterr_set(GITERR_INVALID, "Invalid version %d for git_checkout_opts", version);
+ if (version != GIT_CHECKOUT_OPTIONS_VERSION) {
+ giterr_set(GITERR_INVALID, "Invalid version %d for git_checkout_options", version);
return -1;
} else {
- git_checkout_opts o = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options o = GIT_CHECKOUT_OPTIONS_INIT;
memcpy(opts, &o, sizeof(o));
return 0;
}
diff --git a/src/checkout.h b/src/checkout.h
index 6d71868..f1fe696 100644
--- a/src/checkout.h
+++ b/src/checkout.h
@@ -19,6 +19,6 @@
*/
extern int git_checkout_iterator(
git_iterator *target,
- const git_checkout_opts *opts);
+ const git_checkout_options *opts);
#endif
diff --git a/src/clone.c b/src/clone.c
index b5333bd..e19d02b 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -322,7 +322,7 @@ on_error:
static bool should_checkout(
git_repository *repo,
bool is_bare,
- const git_checkout_opts *opts)
+ const git_checkout_options *opts)
{
if (is_bare)
return false;
@@ -336,7 +336,7 @@ static bool should_checkout(
return !git_repository_head_unborn(repo);
}
-int git_clone_into(git_repository *repo, git_remote *remote, const git_checkout_opts *co_opts, const char *branch, const git_signature *signature)
+int git_clone_into(git_repository *repo, git_remote *remote, const git_checkout_options *co_opts, const char *branch, const git_signature *signature)
{
int error = 0, old_fetchhead;
git_strarray refspecs;
diff --git a/src/reset.c b/src/reset.c
index 07fd088..45a686f 100644
--- a/src/reset.c
+++ b/src/reset.c
@@ -102,7 +102,7 @@ int git_reset(
git_index *index = NULL;
git_tree *tree = NULL;
int error = 0;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_buf log_message_buf = GIT_BUF_INIT;
assert(repo && target);
diff --git a/src/stash.c b/src/stash.c
index 0c91012..d20e29b 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -468,7 +468,7 @@ static int reset_index_and_workdir(
bool remove_untracked,
bool remove_ignored)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
diff --git a/tests/checkout/binaryunicode.c b/tests/checkout/binaryunicode.c
index 14ab9fd..1172816 100644
--- a/tests/checkout/binaryunicode.c
+++ b/tests/checkout/binaryunicode.c
@@ -21,7 +21,7 @@ static void execute_test(void)
git_oid oid, check;
git_commit *commit;
git_tree *tree;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_git_pass(git_reference_name_to_id(&oid, g_repo, "refs/heads/branch1"));
cl_git_pass(git_commit_lookup(&commit, g_repo, &oid));
diff --git a/tests/checkout/conflict.c b/tests/checkout/conflict.c
index 2fea511..2cb7c22 100644
--- a/tests/checkout/conflict.c
+++ b/tests/checkout/conflict.c
@@ -207,7 +207,7 @@ static void ensure_workdir_link(const char *path, const char *target)
void test_checkout_conflict__ignored(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy |= GIT_CHECKOUT_SKIP_UNMERGED;
@@ -221,7 +221,7 @@ void test_checkout_conflict__ignored(void)
void test_checkout_conflict__ours(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy |= GIT_CHECKOUT_USE_OURS;
@@ -234,7 +234,7 @@ void test_checkout_conflict__ours(void)
void test_checkout_conflict__theirs(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy |= GIT_CHECKOUT_USE_THEIRS;
@@ -248,7 +248,7 @@ void test_checkout_conflict__theirs(void)
void test_checkout_conflict__diff3(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
create_conflicting_index();
@@ -259,7 +259,7 @@ void test_checkout_conflict__diff3(void)
void test_checkout_conflict__automerge(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, AUTOMERGEABLE_ANCESTOR_OID, 1, "automergeable.txt" },
@@ -277,7 +277,7 @@ void test_checkout_conflict__automerge(void)
void test_checkout_conflict__directory_file(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, CONFLICTING_ANCESTOR_OID, 1, "df-1" },
@@ -316,7 +316,7 @@ void test_checkout_conflict__directory_file(void)
void test_checkout_conflict__directory_file_with_custom_labels(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, CONFLICTING_ANCESTOR_OID, 1, "df-1" },
@@ -357,7 +357,7 @@ void test_checkout_conflict__directory_file_with_custom_labels(void)
void test_checkout_conflict__link_file(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, CONFLICTING_ANCESTOR_OID, 1, "link-1" },
@@ -393,7 +393,7 @@ void test_checkout_conflict__link_file(void)
void test_checkout_conflict__links(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0120000, LINK_ANCESTOR_OID, 1, "link-1" },
@@ -418,7 +418,7 @@ void test_checkout_conflict__links(void)
void test_checkout_conflict__add_add(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, CONFLICTING_OURS_OID, 2, "conflicting.txt" },
@@ -438,7 +438,7 @@ void test_checkout_conflict__add_add(void)
void test_checkout_conflict__mode_change(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, CONFLICTING_ANCESTOR_OID, 1, "executable-1" },
@@ -495,7 +495,7 @@ void test_checkout_conflict__mode_change(void)
void test_checkout_conflict__renames(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, "68c6c84b091926c7d90aa6a79b2bc3bb6adccd8e", 0, "0a-no-change.txt" },
@@ -680,7 +680,7 @@ void test_checkout_conflict__renames(void)
void test_checkout_conflict__rename_keep_ours(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, "68c6c84b091926c7d90aa6a79b2bc3bb6adccd8e", 0, "0a-no-change.txt" },
@@ -847,7 +847,7 @@ void test_checkout_conflict__rename_keep_ours(void)
void test_checkout_conflict__name_mangled_file_exists_in_workdir(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, "b42712cfe99a1a500b2a51fe984e0b8a7702ba11", 1, "test-one-side-one.txt" },
@@ -987,7 +987,7 @@ void test_checkout_conflict__name_mangled_file_exists_in_workdir(void)
void test_checkout_conflict__update_only(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct checkout_index_entry checkout_index_entries[] = {
{ 0100644, AUTOMERGEABLE_ANCESTOR_OID, 1, "automergeable.txt" },
@@ -1032,7 +1032,7 @@ void test_checkout_conflict__update_only(void)
void test_checkout_conflict__path_filters(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
char *paths[] = { "conflicting-1.txt", "conflicting-3.txt" };
git_strarray patharray = {0};
@@ -1089,7 +1089,7 @@ static void collect_progress(
void test_checkout_conflict__report_progress(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_vector paths = GIT_VECTOR_INIT;
char *path;
size_t i;
diff --git a/tests/checkout/crlf.c b/tests/checkout/crlf.c
index 0d78ee0..6b2c1b1 100644
--- a/tests/checkout/crlf.c
+++ b/tests/checkout/crlf.c
@@ -18,11 +18,24 @@ void test_checkout_crlf__cleanup(void)
cl_git_sandbox_cleanup();
}
+void test_checkout_crlf__detect_crlf_autocrlf_false(void)
+{
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
+ opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
+
+ cl_repo_set_bool(g_repo, "core.autocrlf", false);
+
+ git_checkout_head(g_repo, &opts);
+
+ check_file_contents("./crlf/all-lf", ALL_LF_TEXT_RAW);
+ check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_RAW);
+}
+
void test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size(void)
{
git_index *index;
const git_index_entry *entry;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_bool(g_repo, "core.autocrlf", false);
@@ -42,7 +55,7 @@ void test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size(void)
void test_checkout_crlf__detect_crlf_autocrlf_true(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_bool(g_repo, "core.autocrlf", true);
@@ -59,7 +72,7 @@ void test_checkout_crlf__detect_crlf_autocrlf_true(void)
void test_checkout_crlf__more_lf_autocrlf_true(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_bool(g_repo, "core.autocrlf", true);
@@ -74,7 +87,7 @@ void test_checkout_crlf__more_lf_autocrlf_true(void)
void test_checkout_crlf__more_crlf_autocrlf_true(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_bool(g_repo, "core.autocrlf", true);
@@ -87,11 +100,23 @@ void test_checkout_crlf__more_crlf_autocrlf_true(void)
check_file_contents("./crlf/more-crlf", MORE_CRLF_TEXT_AS_CRLF);
}
+void test_checkout_crlf__all_crlf_autocrlf_true(void)
+{
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
+ opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
+
+ cl_repo_set_bool(g_repo, "core.autocrlf", true);
+
+ git_checkout_head(g_repo, &opts);
+
+ check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_RAW);
+}
+
void test_checkout_crlf__autocrlf_true_index_size_is_filtered_size(void)
{
git_index *index;
const git_index_entry *entry;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_bool(g_repo, "core.autocrlf", true);
@@ -117,7 +142,7 @@ void test_checkout_crlf__with_ident(void)
{
git_index *index;
git_blob *blob;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_git_mkfile("crlf/.gitattributes",
@@ -207,7 +232,7 @@ void test_checkout_crlf__with_ident(void)
void test_checkout_crlf__autocrlf_false_no_attrs(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_bool(g_repo, "core.autocrlf", false);
@@ -220,7 +245,7 @@ void test_checkout_crlf__autocrlf_false_no_attrs(void)
void test_checkout_crlf__autocrlf_true_no_attrs(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_bool(g_repo, "core.autocrlf", true);
@@ -238,7 +263,7 @@ void test_checkout_crlf__autocrlf_true_no_attrs(void)
void test_checkout_crlf__autocrlf_input_no_attrs(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_repo_set_string(g_repo, "core.autocrlf", "input");
@@ -251,7 +276,7 @@ void test_checkout_crlf__autocrlf_input_no_attrs(void)
void test_checkout_crlf__autocrlf_false_text_auto_attr(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_git_mkfile("./crlf/.gitattributes", "* text=auto\n");
@@ -266,7 +291,7 @@ void test_checkout_crlf__autocrlf_false_text_auto_attr(void)
void test_checkout_crlf__autocrlf_true_text_auto_attr(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_git_mkfile("./crlf/.gitattributes", "* text=auto\n");
@@ -286,7 +311,7 @@ void test_checkout_crlf__autocrlf_true_text_auto_attr(void)
void test_checkout_crlf__autocrlf_input_text_auto_attr(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
cl_git_mkfile("./crlf/.gitattributes", "* text=auto\n");
diff --git a/tests/checkout/head.c b/tests/checkout/head.c
index a7a7e90..07cc1d2 100644
--- a/tests/checkout/head.c
+++ b/tests/checkout/head.c
@@ -25,7 +25,7 @@ void test_checkout_head__unborn_head_returns_GIT_EUNBORNBRANCH(void)
void test_checkout_head__with_index_only_tree(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_index *index;
/* let's start by getting things into a known state */
diff --git a/tests/checkout/index.c b/tests/checkout/index.c
index 57ce431..7f641b3 100644
--- a/tests/checkout/index.c
+++ b/tests/checkout/index.c
@@ -43,7 +43,7 @@ void test_checkout_index__cannot_checkout_a_bare_repository(void)
void test_checkout_index__can_create_missing_files(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_assert_equal_i(false, git_path_isfile("./testrepo/README"));
cl_assert_equal_i(false, git_path_isfile("./testrepo/branch_file.txt"));
@@ -60,7 +60,7 @@ void test_checkout_index__can_create_missing_files(void)
void test_checkout_index__can_remove_untracked_files(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_futils_mkdir("./testrepo/dir/subdir/subsubdir", NULL, 0755, GIT_MKDIR_PATH);
cl_git_mkfile("./testrepo/dir/one", "one\n");
@@ -78,7 +78,7 @@ void test_checkout_index__can_remove_untracked_files(void)
void test_checkout_index__honor_the_specified_pathspecs(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
char *entries[] = { "*.txt" };
opts.paths.strings = entries;
@@ -99,7 +99,7 @@ void test_checkout_index__honor_the_specified_pathspecs(void)
void test_checkout_index__honor_the_gitattributes_directives(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
const char *attributes =
"branch_file.txt text eol=crlf\n"
"new.txt text eol=lf\n";
@@ -119,7 +119,7 @@ void test_checkout_index__honor_the_gitattributes_directives(void)
void test_checkout_index__honor_coreautocrlf_setting_set_to_true(void)
{
#ifdef GIT_WIN32
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
const char *expected_readme_text = "hey there\r\n";
cl_git_pass(p_unlink("./testrepo/.gitattributes"));
@@ -135,7 +135,7 @@ void test_checkout_index__honor_coreautocrlf_setting_set_to_true(void)
void test_checkout_index__honor_coresymlinks_setting_set_to_true(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_repo_set_bool(g_repo, "core.symlinks", true);
@@ -161,7 +161,7 @@ void test_checkout_index__honor_coresymlinks_setting_set_to_true(void)
void test_checkout_index__honor_coresymlinks_setting_set_to_false(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_repo_set_bool(g_repo, "core.symlinks", false);
@@ -174,7 +174,7 @@ void test_checkout_index__honor_coresymlinks_setting_set_to_false(void)
void test_checkout_index__donot_overwrite_modified_file_by_default(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_git_mkfile("./testrepo/new.txt", "This isn't what's stored!");
@@ -190,7 +190,7 @@ void test_checkout_index__donot_overwrite_modified_file_by_default(void)
void test_checkout_index__can_overwrite_modified_file(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_git_mkfile("./testrepo/new.txt", "This isn't what's stored!");
@@ -203,7 +203,7 @@ void test_checkout_index__can_overwrite_modified_file(void)
void test_checkout_index__options_disable_filters(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_git_mkfile("./testrepo/.gitattributes", "*.txt text eol=crlf\n");
@@ -224,7 +224,7 @@ void test_checkout_index__options_disable_filters(void)
void test_checkout_index__options_dir_modes(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct stat st;
git_oid oid;
git_commit *commit;
@@ -258,7 +258,7 @@ void test_checkout_index__options_dir_modes(void)
void test_checkout_index__options_override_file_modes(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct stat st;
if (!cl_is_chmod_supported())
@@ -275,7 +275,7 @@ void test_checkout_index__options_override_file_modes(void)
void test_checkout_index__options_open_flags(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_git_mkfile("./testrepo/new.txt", "hi\n");
@@ -315,7 +315,7 @@ static int test_checkout_notify_cb(
void test_checkout_index__can_notify_of_skipped_files(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
struct notify_data data;
cl_git_mkfile("./testrepo/new.txt", "This isn't what's stored!");
@@ -360,7 +360,7 @@ static int dont_notify_cb(
void test_checkout_index__wont_notify_of_expected_line_ending_changes(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_git_pass(p_unlink("./testrepo/.gitattributes"));
cl_repo_set_bool(g_repo, "core.autocrlf", true);
@@ -385,7 +385,7 @@ static void checkout_progress_counter(
void test_checkout_index__calls_progress_callback(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
int calls = 0;
opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
@@ -398,7 +398,7 @@ void test_checkout_index__calls_progress_callback(void)
void test_checkout_index__can_overcome_name_clashes(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_index *index;
cl_git_pass(git_repository_index(&index, g_repo));
@@ -440,7 +440,7 @@ void test_checkout_index__can_overcome_name_clashes(void)
void test_checkout_index__validates_struct_version(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
const git_error *err;
opts.version = 1024;
@@ -459,7 +459,7 @@ void test_checkout_index__validates_struct_version(void)
void test_checkout_index__can_update_prefixed_files(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_assert_equal_i(false, git_path_isfile("./testrepo/README"));
cl_assert_equal_i(false, git_path_isfile("./testrepo/branch_file.txt"));
@@ -502,7 +502,7 @@ void test_checkout_index__can_checkout_a_newly_initialized_repository(void)
void test_checkout_index__issue_1397(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
test_checkout_index__cleanup();
@@ -519,7 +519,7 @@ void test_checkout_index__issue_1397(void)
void test_checkout_index__target_directory(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
checkout_counts cts;
memset(&cts, 0, sizeof(cts));
@@ -551,7 +551,7 @@ void test_checkout_index__target_directory(void)
void test_checkout_index__target_directory_from_bare(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_index *index;
git_object *head = NULL;
checkout_counts cts;
@@ -600,7 +600,7 @@ void test_checkout_index__target_directory_from_bare(void)
void test_checkout_index__can_get_repo_from_index(void)
{
git_index *index;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
cl_assert_equal_i(false, git_path_isfile("./testrepo/README"));
cl_assert_equal_i(false, git_path_isfile("./testrepo/branch_file.txt"));
diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c
index f433b26..b61ef2d 100644
--- a/tests/checkout/tree.c
+++ b/tests/checkout/tree.c
@@ -7,14 +7,14 @@
#include "fileops.h"
static git_repository *g_repo;
-static git_checkout_opts g_opts;
+static git_checkout_options g_opts;
static git_object *g_object;
void test_checkout_tree__initialize(void)
{
g_repo = cl_git_sandbox_init("testrepo");
- GIT_INIT_STRUCTURE(&g_opts, GIT_CHECKOUT_OPTS_VERSION);
+ GIT_INIT_STRUCTURE(&g_opts, GIT_CHECKOUT_OPTIONS_VERSION);
g_opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
}
@@ -128,7 +128,7 @@ void test_checkout_tree__doesnt_write_unrequested_files_to_worktree(void)
git_oid chomped_oid;
git_commit* p_master_commit;
git_commit* p_chomped_commit;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid_fromstr(&master_oid, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
git_oid_fromstr(&chomped_oid, "e90810b8df3e80c413d903f631643c716887138d");
@@ -148,7 +148,7 @@ void test_checkout_tree__doesnt_write_unrequested_files_to_worktree(void)
void test_checkout_tree__can_switch_branches(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
git_object *obj = NULL;
@@ -202,7 +202,7 @@ void test_checkout_tree__can_switch_branches(void)
void test_checkout_tree__can_remove_untracked(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_REMOVE_UNTRACKED;
@@ -216,7 +216,7 @@ void test_checkout_tree__can_remove_untracked(void)
void test_checkout_tree__can_remove_ignored(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
int ignored = 0;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_REMOVE_IGNORED;
@@ -239,7 +239,7 @@ static int checkout_tree_with_blob_ignored_in_workdir(int strategy, bool isdir)
{
git_oid oid;
git_object *obj = NULL;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
int ignored = 0, error;
assert_on_branch(g_repo, "master");
@@ -344,7 +344,7 @@ void test_checkout_tree__can_overwrite_ignored_folder_by_default(void)
void test_checkout_tree__can_update_only(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
git_object *obj = NULL;
@@ -554,7 +554,7 @@ void test_checkout_tree__checking_out_a_conflicting_content_change_returns_EMERG
void test_checkout_tree__donot_update_deleted_file_by_default(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid old_id, new_id;
git_commit *old_commit = NULL, *new_commit = NULL;
git_index *index = NULL;
@@ -622,7 +622,7 @@ static int checkout_cancel_cb(
void test_checkout_tree__can_cancel_checkout_from_notify(void)
{
struct checkout_cancel_at ca;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
git_object *obj = NULL;
@@ -674,7 +674,7 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
void test_checkout_tree__can_checkout_with_last_workdir_item_missing(void)
{
git_index *index = NULL;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid tree_id, commit_id;
git_tree *tree = NULL;
git_commit *commit = NULL;
@@ -710,7 +710,7 @@ void test_checkout_tree__can_checkout_with_last_workdir_item_missing(void)
void test_checkout_tree__issue_1397(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
const char *partial_oid = "8a7ef04";
git_object *tree = NULL;
@@ -733,7 +733,7 @@ void test_checkout_tree__issue_1397(void)
void test_checkout_tree__can_write_to_empty_dirs(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
git_object *obj = NULL;
@@ -759,7 +759,7 @@ void test_checkout_tree__can_write_to_empty_dirs(void)
void test_checkout_tree__fails_when_dir_in_use(void)
{
#ifdef GIT_WIN32
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
git_object *obj = NULL;
@@ -792,7 +792,7 @@ void test_checkout_tree__fails_when_dir_in_use(void)
void test_checkout_tree__can_continue_when_dir_in_use(void)
{
#ifdef GIT_WIN32
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
git_object *obj = NULL;
@@ -825,7 +825,7 @@ void test_checkout_tree__can_continue_when_dir_in_use(void)
void test_checkout_tree__target_directory_from_bare(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
checkout_counts cts;
memset(&cts, 0, sizeof(cts));
@@ -910,7 +910,7 @@ static void create_conflict(void)
void test_checkout_tree__fails_when_conflicts_exist_in_index(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_oid oid;
git_object *obj = NULL;
@@ -930,7 +930,7 @@ void test_checkout_tree__filemode_preserved_in_index(void)
{
git_oid executable_oid;
git_commit *commit;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_index *index;
const git_index_entry *entry;
diff --git a/tests/checkout/typechange.c b/tests/checkout/typechange.c
index d88864c..7aa14b3 100644
--- a/tests/checkout/typechange.c
+++ b/tests/checkout/typechange.c
@@ -107,7 +107,7 @@ void test_checkout_typechange__checkout_typechanges_safe(void)
{
int i;
git_object *obj;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
for (i = 0; g_typechange_oids[i] != NULL; ++i) {
cl_git_pass(git_revparse_single(&obj, g_repo, g_typechange_oids[i]));
@@ -194,7 +194,7 @@ void test_checkout_typechange__checkout_with_conflicts(void)
{
int i;
git_object *obj;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
notify_counts cts = {0};
opts.notify_flags =
diff --git a/tests/clone/nonetwork.c b/tests/clone/nonetwork.c
index f00d28b..68a2774 100644
--- a/tests/clone/nonetwork.c
+++ b/tests/clone/nonetwork.c
@@ -14,7 +14,7 @@ static git_remote* g_remote;
void test_clone_nonetwork__initialize(void)
{
- git_checkout_opts dummy_opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options dummy_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_remote_callbacks dummy_callbacks = GIT_REMOTE_CALLBACKS_INIT;
g_repo = NULL;
diff --git a/tests/diff/rename.c b/tests/diff/rename.c
index ca08d15..4bc3eb5 100644
--- a/tests/diff/rename.c
+++ b/tests/diff/rename.c
@@ -929,7 +929,7 @@ void test_diff_rename__rejected_match_can_match_others(void)
git_reference *head, *selfsimilar;
git_index *index;
git_tree *tree;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_diff *diff;
git_diff_options diffopts = GIT_DIFF_OPTIONS_INIT;
git_diff_find_options findopts = GIT_DIFF_FIND_OPTIONS_INIT;
@@ -1016,7 +1016,7 @@ void test_diff_rename__rejected_match_can_match_others_two(void)
git_reference *head, *selfsimilar;
git_index *index;
git_tree *tree;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_diff *diff;
git_diff_options diffopts = GIT_DIFF_OPTIONS_INIT;
git_diff_find_options findopts = GIT_DIFF_FIND_OPTIONS_INIT;
@@ -1072,7 +1072,7 @@ void test_diff_rename__rejected_match_can_match_others_three(void)
git_reference *head, *selfsimilar;
git_index *index;
git_tree *tree;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
git_diff *diff;
git_diff_options diffopts = GIT_DIFF_OPTIONS_INIT;
git_diff_find_options findopts = GIT_DIFF_FIND_OPTIONS_INIT;
diff --git a/tests/index/names.c b/tests/index/names.c
index 4723449..52922e9 100644
--- a/tests/index/names.c
+++ b/tests/index/names.c
@@ -112,7 +112,7 @@ void test_index_names__cleaned_on_checkout_tree(void)
{
git_oid oid;
git_object *obj;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_UPDATE_ONLY;
@@ -127,7 +127,7 @@ void test_index_names__cleaned_on_checkout_tree(void)
void test_index_names__cleaned_on_checkout_head(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_UPDATE_ONLY;
@@ -138,7 +138,7 @@ void test_index_names__cleaned_on_checkout_head(void)
void test_index_names__retained_on_checkout_index(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_UPDATE_ONLY;
diff --git a/tests/index/reuc.c b/tests/index/reuc.c
index bf051c8..27240a3 100644
--- a/tests/index/reuc.c
+++ b/tests/index/reuc.c
@@ -336,7 +336,7 @@ void test_index_reuc__cleaned_on_checkout_tree(void)
{
git_oid oid;
git_object *obj;
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_UPDATE_ONLY;
@@ -351,7 +351,7 @@ void test_index_reuc__cleaned_on_checkout_tree(void)
void test_index_reuc__cleaned_on_checkout_head(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_UPDATE_ONLY;
@@ -362,7 +362,7 @@ void test_index_reuc__cleaned_on_checkout_head(void)
void test_index_reuc__retained_on_checkout_index(void)
{
- git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_UPDATE_ONLY;
diff --git a/tests/merge/merge_helpers.c b/tests/merge/merge_helpers.c
index 8d6ef2d..14a30b2 100644
--- a/tests/merge/merge_helpers.c
+++ b/tests/merge/merge_helpers.c
@@ -83,7 +83,7 @@ int merge_branches(git_merge_result **result, git_repository *repo, const char *
{
git_reference *head_ref, *theirs_ref;
git_merge_head *theirs_head;
- git_checkout_opts head_checkout_opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options head_checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
head_checkout_opts.checkout_strategy = GIT_CHECKOUT_FORCE;
diff --git a/tests/merge/workdir/trivial.c b/tests/merge/workdir/trivial.c
index a6bbbf0..8b0d328 100644
--- a/tests/merge/workdir/trivial.c
+++ b/tests/merge/workdir/trivial.c
@@ -31,7 +31,7 @@ void test_merge_workdir_trivial__cleanup(void)
static int merge_trivial(const char *ours, const char *theirs)
{
git_buf branch_buf = GIT_BUF_INIT;
- git_checkout_opts checkout_opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_reference *our_ref, *their_ref;
git_merge_head *their_heads[1];
git_merge_opts opts = GIT_MERGE_OPTS_INIT;
diff --git a/tests/online/clone.c b/tests/online/clone.c
index fa2408a..9919e8b 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -18,7 +18,7 @@ static git_clone_options g_options;
void test_online_clone__initialize(void)
{
- git_checkout_opts dummy_opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options dummy_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_remote_callbacks dummy_callbacks = GIT_REMOTE_CALLBACKS_INIT;
g_repo = NULL;
@@ -130,7 +130,7 @@ void test_online_clone__clone_into(void)
git_buf path = GIT_BUF_INIT;
git_remote *remote;
git_reference *head;
- git_checkout_opts checkout_opts = GIT_CHECKOUT_OPTS_INIT;
+ git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
bool checkout_progress_cb_was_called = false,
diff --git a/tests/structinit/structinit.c b/tests/structinit/structinit.c
index ce425be..ec4f439 100644
--- a/tests/structinit/structinit.c
+++ b/tests/structinit/structinit.c
@@ -47,8 +47,8 @@ void test_structinit_structinit__compare(void)
/* checkout */
CHECK_MACRO_FUNC_INIT_EQUAL( \
- git_checkout_opts, GIT_CHECKOUT_OPTS_VERSION, \
- GIT_CHECKOUT_OPTS_INIT, git_checkout_init_opts);
+ git_checkout_options, GIT_CHECKOUT_OPTIONS_VERSION, \
+ GIT_CHECKOUT_OPTIONS_INIT, git_checkout_init_opts);
/* clone */
CHECK_MACRO_FUNC_INIT_EQUAL( \