index: rename an entry's id to 'id' This was not converted when we converted the rest, so do it now.
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
diff --git a/examples/showindex.c b/examples/showindex.c
index 7f7c383..ad4a16e 100644
--- a/examples/showindex.c
+++ b/examples/showindex.c
@@ -49,7 +49,7 @@ int main (int argc, char** argv)
for (i = 0; i < ecount; ++i) {
const git_index_entry *e = git_index_get_byindex(index, i);
- git_oid_fmt(out, &e->oid);
+ git_oid_fmt(out, &e->id);
printf("File Path: %s\n", e->path);
printf(" Stage: %d\n", git_index_entry_stage(e));
diff --git a/include/git2/index.h b/include/git2/index.h
index ffefad1..4363a3b 100644
--- a/include/git2/index.h
+++ b/include/git2/index.h
@@ -56,7 +56,7 @@ typedef struct git_index_entry {
unsigned int gid;
git_off_t file_size;
- git_oid oid;
+ git_oid id;
unsigned short flags;
unsigned short flags_extended;
diff --git a/src/attr.c b/src/attr.c
index e6e274e..ff4446e 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -314,10 +314,10 @@ static int load_attr_blob_from_index(
entry = git_index_get_byindex(index, pos);
- if (old_oid && git_oid__cmp(old_oid, &entry->oid) == 0)
+ if (old_oid && git_oid__cmp(old_oid, &entry->id) == 0)
return GIT_ENOTFOUND;
- if ((error = git_blob_lookup(blob, repo, &entry->oid)) < 0)
+ if ((error = git_blob_lookup(blob, repo, &entry->id)) < 0)
return error;
*content = git_blob_rawcontent(*blob);
diff --git a/src/checkout.c b/src/checkout.c
index 6769cbc..efd55db 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -92,7 +92,7 @@ static int checkout_notify(
if (wditem) {
memset(&wdfile, 0, sizeof(wdfile));
- git_oid_cpy(&wdfile.oid, &wditem->oid);
+ git_oid_cpy(&wdfile.oid, &wditem->id);
wdfile.path = wditem->path;
wdfile.size = wditem->file_size;
wdfile.flags = GIT_DIFF_FLAG_VALID_OID;
@@ -170,7 +170,7 @@ static bool checkout_is_workdir_modified(
if (wditem->mtime.seconds == ie->mtime.seconds &&
wditem->mtime.nanoseconds == ie->mtime.nanoseconds &&
wditem->file_size == ie->file_size)
- return (git_oid__cmp(&baseitem->oid, &ie->oid) != 0);
+ return (git_oid__cmp(&baseitem->oid, &ie->id) != 0);
}
/* depending on where base is coming from, we may or may not know
@@ -700,21 +700,21 @@ GIT_INLINE(int) checkout_conflict_detect_binary(git_repository *repo, checkout_c
return 0;
if (conflict->ancestor) {
- if ((error = git_blob_lookup(&ancestor_blob, repo, &conflict->ancestor->oid)) < 0)
+ if ((error = git_blob_lookup(&ancestor_blob, repo, &conflict->ancestor->id)) < 0)
goto done;
conflict->binary = git_blob_is_binary(ancestor_blob);
}
if (!conflict->binary && conflict->ours) {
- if ((error = git_blob_lookup(&our_blob, repo, &conflict->ours->oid)) < 0)
+ if ((error = git_blob_lookup(&our_blob, repo, &conflict->ours->id)) < 0)
goto done;
conflict->binary = git_blob_is_binary(our_blob);
}
if (!conflict->binary && conflict->theirs) {
- if ((error = git_blob_lookup(&their_blob, repo, &conflict->theirs->oid)) < 0)
+ if ((error = git_blob_lookup(&their_blob, repo, &conflict->theirs->id)) < 0)
goto done;
conflict->binary = git_blob_is_binary(their_blob);
@@ -1221,7 +1221,7 @@ static int checkout_update_index(
memset(&entry, 0, sizeof(entry));
entry.path = (char *)file->path; /* cast to prevent warning */
git_index_entry__init_from_stat(&entry, st, true);
- git_oid_cpy(&entry.oid, &file->oid);
+ git_oid_cpy(&entry.id, &file->oid);
return git_index_add(data->index, &entry);
}
@@ -1631,7 +1631,7 @@ static int checkout_write_entry(
return error;
return checkout_write_content(data,
- &side->oid, git_buf_cstr(&data->path), hint_path, side->mode, &st);
+ &side->id, git_buf_cstr(&data->path), hint_path, side->mode, &st);
}
static int checkout_write_entries(
diff --git a/src/crlf.c b/src/crlf.c
index b25c02c..e1bd557 100644
--- a/src/crlf.c
+++ b/src/crlf.c
@@ -101,7 +101,7 @@ static int has_cr_in_index(const git_filter_source *src)
if (!S_ISREG(entry->mode)) /* don't crlf filter non-blobs */
return true;
- if (git_blob_lookup(&blob, repo, &entry->oid) < 0)
+ if (git_blob_lookup(&blob, repo, &entry->id) < 0)
return false;
blobcontent = git_blob_rawcontent(blob);
diff --git a/src/diff.c b/src/diff.c
index 7f2e58c..75a90a0 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -110,11 +110,11 @@ static int diff_delta__from_one(
if (delta->status == GIT_DELTA_DELETED) {
delta->old_file.mode = entry->mode;
delta->old_file.size = entry->file_size;
- git_oid_cpy(&delta->old_file.oid, &entry->oid);
+ git_oid_cpy(&delta->old_file.oid, &entry->id);
} else /* ADDED, IGNORED, UNTRACKED */ {
delta->new_file.mode = entry->mode;
delta->new_file.size = entry->file_size;
- git_oid_cpy(&delta->new_file.oid, &entry->oid);
+ git_oid_cpy(&delta->new_file.oid, &entry->id);
}
delta->old_file.flags |= GIT_DIFF_FLAG_VALID_OID;
@@ -156,12 +156,12 @@ static int diff_delta__from_two(
GITERR_CHECK_ALLOC(delta);
delta->nfiles = 2;
- git_oid_cpy(&delta->old_file.oid, &old_entry->oid);
+ git_oid_cpy(&delta->old_file.oid, &old_entry->id);
delta->old_file.size = old_entry->file_size;
delta->old_file.mode = old_mode;
delta->old_file.flags |= GIT_DIFF_FLAG_VALID_OID;
- git_oid_cpy(&delta->new_file.oid, &new_entry->oid);
+ git_oid_cpy(&delta->new_file.oid, &new_entry->id);
delta->new_file.size = new_entry->file_size;
delta->new_file.mode = new_mode;
@@ -172,7 +172,7 @@ static int diff_delta__from_two(
git_oid_cpy(&delta->new_file.oid, new_oid);
}
- if (new_oid || !git_oid_iszero(&new_entry->oid))
+ if (new_oid || !git_oid_iszero(&new_entry->id))
delta->new_file.flags |= GIT_DIFF_FLAG_VALID_OID;
return diff_insert_delta(diff, delta, matched_pathspec);
@@ -189,21 +189,21 @@ static git_diff_delta *diff_delta__last_for_item(
switch (delta->status) {
case GIT_DELTA_UNMODIFIED:
case GIT_DELTA_DELETED:
- if (git_oid__cmp(&delta->old_file.oid, &item->oid) == 0)
+ if (git_oid__cmp(&delta->old_file.oid, &item->id) == 0)
return delta;
break;
case GIT_DELTA_ADDED:
- if (git_oid__cmp(&delta->new_file.oid, &item->oid) == 0)
+ if (git_oid__cmp(&delta->new_file.oid, &item->id) == 0)
return delta;
break;
case GIT_DELTA_UNTRACKED:
if (diff->strcomp(delta->new_file.path, item->path) == 0 &&
- git_oid__cmp(&delta->new_file.oid, &item->oid) == 0)
+ git_oid__cmp(&delta->new_file.oid, &item->id) == 0)
return delta;
break;
case GIT_DELTA_MODIFIED:
- if (git_oid__cmp(&delta->old_file.oid, &item->oid) == 0 ||
- git_oid__cmp(&delta->new_file.oid, &item->oid) == 0)
+ if (git_oid__cmp(&delta->old_file.oid, &item->id) == 0 ||
+ git_oid__cmp(&delta->new_file.oid, &item->id) == 0)
return delta;
break;
default:
@@ -629,7 +629,7 @@ static int maybe_modified_submodule(
/* now that we have a HEAD OID, check if HEAD moved */
if ((sm_status & GIT_SUBMODULE_STATUS_IN_WD) != 0 &&
- !git_oid_equal(&info->oitem->oid, found_oid))
+ !git_oid_equal(&info->oitem->id, found_oid))
*status = GIT_DELTA_MODIFIED;
return 0;
@@ -689,15 +689,15 @@ static int maybe_modified(
}
/* if oids and modes match (and are valid), then file is unmodified */
- else if (git_oid_equal(&oitem->oid, &nitem->oid) &&
+ else if (git_oid_equal(&oitem->id, &nitem->id) &&
omode == nmode &&
- !git_oid_iszero(&oitem->oid))
+ !git_oid_iszero(&oitem->id))
status = GIT_DELTA_UNMODIFIED;
/* if we have an unknown OID and a workdir iterator, then check some
* circumstances that can accelerate things or need special handling
*/
- else if (git_oid_iszero(&nitem->oid) && new_is_workdir) {
+ else if (git_oid_iszero(&nitem->id) && new_is_workdir) {
bool use_ctime = ((diff->diffcaps & GIT_DIFFCAPS_TRUST_CTIME) != 0);
bool use_nanos = ((diff->diffcaps & GIT_DIFFCAPS_TRUST_NANOSECS) != 0);
@@ -732,7 +732,7 @@ static int maybe_modified(
/* if we got here and decided that the files are modified, but we
* haven't calculated the OID of the new item, then calculate it now
*/
- if (status == GIT_DELTA_MODIFIED && git_oid_iszero(&nitem->oid)) {
+ if (status == GIT_DELTA_MODIFIED && git_oid_iszero(&nitem->id)) {
if (git_oid_iszero(&noid)) {
if ((error = git_diff__oid_for_file(diff->repo,
nitem->path, nitem->mode, nitem->file_size, &noid)) < 0)
@@ -744,7 +744,7 @@ static int maybe_modified(
* matches between the index and the workdir HEAD)
*/
if (omode == nmode && !S_ISGITLINK(omode) &&
- git_oid_equal(&oitem->oid, &noid))
+ git_oid_equal(&oitem->id, &noid))
status = GIT_DELTA_UNMODIFIED;
}
diff --git a/src/index.c b/src/index.c
index bb81f66..d589684 100644
--- a/src/index.c
+++ b/src/index.c
@@ -643,7 +643,7 @@ static int index_entry_init(
git_index_entry__init_from_stat(entry, &st, !index->distrust_filemode);
- entry->oid = oid;
+ entry->id = oid;
entry->path = git__strdup(rel_path);
GITERR_CHECK_ALLOC(entry->path);
@@ -757,9 +757,9 @@ static int index_conflict_to_reuc(git_index *index, const char *path)
our_mode = conflict_entries[1] == NULL ? 0 : conflict_entries[1]->mode;
their_mode = conflict_entries[2] == NULL ? 0 : conflict_entries[2]->mode;
- ancestor_oid = conflict_entries[0] == NULL ? NULL : &conflict_entries[0]->oid;
- our_oid = conflict_entries[1] == NULL ? NULL : &conflict_entries[1]->oid;
- their_oid = conflict_entries[2] == NULL ? NULL : &conflict_entries[2]->oid;
+ ancestor_oid = conflict_entries[0] == NULL ? NULL : &conflict_entries[0]->id;
+ our_oid = conflict_entries[1] == NULL ? NULL : &conflict_entries[1]->id;
+ their_oid = conflict_entries[2] == NULL ? NULL : &conflict_entries[2]->id;
if ((ret = git_index_reuc_add(index, path, ancestor_mode, ancestor_oid,
our_mode, our_oid, their_mode, their_oid)) >= 0)
@@ -1515,7 +1515,7 @@ static size_t read_entry(git_index_entry *dest, const void *buffer, size_t buffe
dest->uid = ntohl(source->uid);
dest->gid = ntohl(source->gid);
dest->file_size = ntohl(source->file_size);
- git_oid_cpy(&dest->oid, &source->oid);
+ git_oid_cpy(&dest->id, &source->oid);
dest->flags = ntohs(source->flags);
if (dest->flags & GIT_IDXENTRY_EXTENDED) {
@@ -1756,7 +1756,7 @@ static int write_disk_entry(git_filebuf *file, git_index_entry *entry)
ondisk->gid = htonl(entry->gid);
ondisk->file_size = htonl((uint32_t)entry->file_size);
- git_oid_cpy(&ondisk->oid, &entry->oid);
+ git_oid_cpy(&ondisk->oid, &entry->id);
ondisk->flags = htons(entry->flags);
@@ -1983,7 +1983,7 @@ static int read_tree_cb(
GITERR_CHECK_ALLOC(entry);
entry->mode = tentry->attr;
- entry->oid = tentry->oid;
+ entry->id = tentry->oid;
/* look for corresponding old entry and copy data to new entry */
if (data->old_entries) {
@@ -1997,7 +1997,7 @@ static int read_tree_cb(
&pos, data->old_entries, data->entries_search, &skey) &&
(old_entry = git_vector_get(data->old_entries, pos)) != NULL &&
entry->mode == old_entry->mode &&
- git_oid_equal(&entry->oid, &old_entry->oid))
+ git_oid_equal(&entry->id, &old_entry->id))
{
memcpy(entry, old_entry, sizeof(*entry));
entry->flags_extended = 0;
@@ -2135,7 +2135,7 @@ int git_index_add_all(
error = -1;
break;
}
- entry->oid = blobid;
+ entry->id = blobid;
/* add working directory item to index */
if ((error = index_insert(index, entry, 1)) < 0) {
diff --git a/src/iterator.c b/src/iterator.c
index 0e7d0db..401b5de 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -447,7 +447,7 @@ static int tree_iterator__update_entry(tree_iterator *ti)
te = tf->entries[tf->current]->te;
ti->entry.mode = te->attr;
- git_oid_cpy(&ti->entry.oid, &te->oid);
+ git_oid_cpy(&ti->entry.id, &te->oid);
ti->entry.path = tree_iterator__current_filename(ti, te);
GITERR_CHECK_ALLOC(ti->entry.path);
diff --git a/src/merge.c b/src/merge.c
index 2fb1c58..23a1574 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -317,7 +317,7 @@ GIT_INLINE(int) index_entry_cmp(const git_index_entry *a, const git_index_entry
return (b->path == NULL) ? 0 : 1;
if ((value = a->mode - b->mode) == 0 &&
- (value = git_oid__cmp(&a->oid, &b->oid)) == 0)
+ (value = git_oid__cmp(&a->id, &b->id)) == 0)
value = strcmp(a->path, b->path);
return value;
@@ -478,12 +478,12 @@ static int merge_conflict_resolve_one_renamed(
conflict->type == GIT_MERGE_DIFF_RENAMED_ADDED)
return 0;
- ours_changed = (git_oid__cmp(&conflict->ancestor_entry.oid, &conflict->our_entry.oid) != 0);
- theirs_changed = (git_oid__cmp(&conflict->ancestor_entry.oid, &conflict->their_entry.oid) != 0);
+ ours_changed = (git_oid__cmp(&conflict->ancestor_entry.id, &conflict->our_entry.id) != 0);
+ theirs_changed = (git_oid__cmp(&conflict->ancestor_entry.id, &conflict->their_entry.id) != 0);
/* if both are modified (and not to a common target) require a merge */
if (ours_changed && theirs_changed &&
- git_oid__cmp(&conflict->our_entry.oid, &conflict->their_entry.oid) != 0)
+ git_oid__cmp(&conflict->our_entry.id, &conflict->their_entry.id) != 0)
return 0;
if ((merged = git_pool_malloc(&diff_list->pool, sizeof(git_index_entry))) == NULL)
@@ -575,7 +575,7 @@ static int merge_conflict_resolve_automerge(
index_entry->file_size = result.len;
index_entry->mode = result.mode;
- git_oid_cpy(&index_entry->oid, &automerge_oid);
+ git_oid_cpy(&index_entry->id, &automerge_oid);
git_vector_insert(&diff_list->staged, index_entry);
git_vector_insert(&diff_list->resolved, (git_merge_diff *)conflict);
@@ -643,7 +643,7 @@ static int index_entry_similarity_exact(
GIT_UNUSED(cache);
GIT_UNUSED(opts);
- if (git_oid__cmp(&a->oid, &b->oid) == 0)
+ if (git_oid__cmp(&a->id, &b->id) == 0)
return 100;
return 0;
@@ -662,10 +662,10 @@ static int index_entry_similarity_calc(
*out = NULL;
- if ((error = git_blob_lookup(&blob, repo, &entry->oid)) < 0)
+ if ((error = git_blob_lookup(&blob, repo, &entry->id)) < 0)
return error;
- git_oid_cpy(&diff_file.oid, &entry->oid);
+ git_oid_cpy(&diff_file.oid, &entry->id);
diff_file.path = entry->path;
diff_file.size = entry->file_size;
diff_file.mode = entry->mode;
@@ -1163,7 +1163,7 @@ GIT_INLINE(int) merge_diff_detect_binary(
int error = 0;
if (GIT_MERGE_INDEX_ENTRY_ISFILE(conflict->ancestor_entry)) {
- if ((error = git_blob_lookup(&ancestor_blob, repo, &conflict->ancestor_entry.oid)) < 0)
+ if ((error = git_blob_lookup(&ancestor_blob, repo, &conflict->ancestor_entry.id)) < 0)
goto done;
conflict->binary = git_blob_is_binary(ancestor_blob);
@@ -1171,7 +1171,7 @@ GIT_INLINE(int) merge_diff_detect_binary(
if (!conflict->binary &&
GIT_MERGE_INDEX_ENTRY_ISFILE(conflict->our_entry)) {
- if ((error = git_blob_lookup(&our_blob, repo, &conflict->our_entry.oid)) < 0)
+ if ((error = git_blob_lookup(&our_blob, repo, &conflict->our_entry.id)) < 0)
goto done;
conflict->binary = git_blob_is_binary(our_blob);
@@ -1179,7 +1179,7 @@ GIT_INLINE(int) merge_diff_detect_binary(
if (!conflict->binary &&
GIT_MERGE_INDEX_ENTRY_ISFILE(conflict->their_entry)) {
- if ((error = git_blob_lookup(&their_blob, repo, &conflict->their_entry.oid)) < 0)
+ if ((error = git_blob_lookup(&their_blob, repo, &conflict->their_entry.id)) < 0)
goto done;
conflict->binary = git_blob_is_binary(their_blob);
@@ -1222,7 +1222,7 @@ GIT_INLINE(int) merge_delta_type_from_index_entries(
return GIT_DELTA_TYPECHANGE;
else if(S_ISLNK(ancestor->mode) ^ S_ISLNK(other->mode))
return GIT_DELTA_TYPECHANGE;
- else if (git_oid__cmp(&ancestor->oid, &other->oid) ||
+ else if (git_oid__cmp(&ancestor->id, &other->id) ||
ancestor->mode != other->mode)
return GIT_DELTA_MODIFIED;
@@ -1497,7 +1497,7 @@ static int merge_index_insert_reuc(
}
mode[idx] = entry->mode;
- oid[idx] = &entry->oid;
+ oid[idx] = &entry->id;
return git_index_reuc_add(index, entry->path,
mode[0], oid[0], mode[1], oid[1], mode[2], oid[2]);
diff --git a/src/merge_file.c b/src/merge_file.c
index 9961ef2..0878866 100644
--- a/src/merge_file.c
+++ b/src/merge_file.c
@@ -77,7 +77,7 @@ int git_merge_file_input_from_index_entry(
return 0;
if ((error = git_repository_odb(&odb, repo)) < 0 ||
- (error = git_odb_read(&input->odb_object, odb, &entry->oid)) < 0)
+ (error = git_odb_read(&input->odb_object, odb, &entry->id)) < 0)
goto done;
input->mode = entry->mode;
diff --git a/src/notes.c b/src/notes.c
index 1ff0e35..ffe5d34 100644
--- a/src/notes.c
+++ b/src/notes.c
@@ -640,7 +640,7 @@ int git_note_next(
if ((error = git_iterator_current(&item, it)) < 0)
return error;
- git_oid_cpy(note_id, &item->oid);
+ git_oid_cpy(note_id, &item->id);
if (!(error = process_entry_path(item->path, annotated_id)))
git_iterator_advance(NULL, it);
diff --git a/src/reset.c b/src/reset.c
index 32e1013..b9c783b 100644
--- a/src/reset.c
+++ b/src/reset.c
@@ -72,7 +72,7 @@ int git_reset_default(
goto cleanup;
} else {
entry.mode = delta->new_file.mode;
- git_oid_cpy(&entry.oid, &delta->new_file.oid);
+ git_oid_cpy(&entry.id, &delta->new_file.oid);
entry.path = (char *)delta->new_file.path;
if ((error = git_index_add(index, &entry)) < 0)
diff --git a/src/submodule.c b/src/submodule.c
index 3ffbfdb..720681d 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -387,7 +387,7 @@ int git_submodule_add_to_index(git_submodule *sm, int write_index)
error = -1;
goto cleanup;
}
- git_oid_cpy(&entry.oid, &sm->wd_oid);
+ git_oid_cpy(&entry.id, &sm->wd_oid);
if ((error = git_commit_lookup(&head, sm_repo, &sm->wd_oid)) < 0)
goto cleanup;
@@ -780,7 +780,7 @@ static void submodule_update_from_index_entry(
if (already_found)
sm->flags |= GIT_SUBMODULE_STATUS__INDEX_MULTIPLE_ENTRIES;
else
- git_oid_cpy(&sm->index_oid, &ie->oid);
+ git_oid_cpy(&sm->index_oid, &ie->id);
sm->flags |= GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS__INDEX_OID_VALID;
@@ -1281,7 +1281,7 @@ static int load_submodule_config_from_index(
if (!submodule_get(&sm, repo, entry->path, NULL))
submodule_update_from_index_entry(sm, entry);
} else if (strcmp(entry->path, GIT_MODULES_FILE) == 0)
- git_oid_cpy(gitmodules_oid, &entry->oid);
+ git_oid_cpy(gitmodules_oid, &entry->id);
}
if (error == GIT_ITEROVER)
@@ -1320,16 +1320,16 @@ static int load_submodule_config_from_head(
if (S_ISGITLINK(entry->mode))
submodule_update_from_head_data(
- sm, entry->mode, &entry->oid);
+ sm, entry->mode, &entry->id);
else
sm->flags |= GIT_SUBMODULE_STATUS__HEAD_NOT_SUBMODULE;
} else if (S_ISGITLINK(entry->mode)) {
if (!submodule_get(&sm, repo, entry->path, NULL))
submodule_update_from_head_data(
- sm, entry->mode, &entry->oid);
+ sm, entry->mode, &entry->id);
} else if (strcmp(entry->path, GIT_MODULES_FILE) == 0 &&
git_oid_iszero(gitmodules_oid)) {
- git_oid_cpy(gitmodules_oid, &entry->oid);
+ git_oid_cpy(gitmodules_oid, &entry->id);
}
}
diff --git a/src/tree.c b/src/tree.c
index fc105ed..3fb544e 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -551,7 +551,7 @@ static int write_tree(
if (error < 0)
goto on_error;
} else {
- error = append_entry(bld, filename, &entry->oid, entry->mode);
+ error = append_entry(bld, filename, &entry->id, entry->mode);
if (error < 0)
goto on_error;
}
diff --git a/tests/attr/repo.c b/tests/attr/repo.c
index f9ba585..49cccdc 100644
--- a/tests/attr/repo.c
+++ b/tests/attr/repo.c
@@ -293,7 +293,7 @@ static void assert_proper_normalization(git_index *index, const char *filename,
cl_assert(!git_index_find(&index_pos, index, filename));
entry = git_index_get_byindex(index, index_pos);
- cl_assert_equal_i(0, git_oid_streq(&entry->oid, expected_sha));
+ cl_assert_equal_i(0, git_oid_streq(&entry->id, expected_sha));
}
void test_attr_repo__staging_properly_normalizes_line_endings_according_to_gitattributes_directives(void)
diff --git a/tests/checkout/conflict.c b/tests/checkout/conflict.c
index 66965a8..a8b93b2 100644
--- a/tests/checkout/conflict.c
+++ b/tests/checkout/conflict.c
@@ -96,7 +96,7 @@ static void create_index(struct checkout_index_entry *entries, size_t entries_le
entry.mode = entries[i].mode;
entry.flags = entries[i].stage << GIT_IDXENTRY_STAGESHIFT;
- git_oid_fromstr(&entry.oid, entries[i].oid_str);
+ git_oid_fromstr(&entry.id, entries[i].oid_str);
entry.path = entries[i].path;
cl_git_pass(git_index_add(g_index, &entry));
diff --git a/tests/checkout/crlf.c b/tests/checkout/crlf.c
index 9a4cbd3..cba7943 100644
--- a/tests/checkout/crlf.c
+++ b/tests/checkout/crlf.c
@@ -174,13 +174,13 @@ void test_checkout_crlf__with_ident(void)
/* check that blobs have $Id$ */
cl_git_pass(git_blob_lookup(&blob, g_repo,
- & git_index_get_bypath(index, "lf.ident", 0)->oid));
+ & git_index_get_bypath(index, "lf.ident", 0)->id));
cl_assert_equal_s(
ALL_LF_TEXT_RAW "\n$Id$\n", git_blob_rawcontent(blob));
git_blob_free(blob);
cl_git_pass(git_blob_lookup(&blob, g_repo,
- & git_index_get_bypath(index, "more2.identcrlf", 0)->oid));
+ & git_index_get_bypath(index, "more2.identcrlf", 0)->id));
cl_assert_equal_s(
"\n$Id$\n" MORE_CRLF_TEXT_AS_LF, git_blob_rawcontent(blob));
git_blob_free(blob);
diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c
index 047c9ed..3c731c5 100644
--- a/tests/checkout/tree.c
+++ b/tests/checkout/tree.c
@@ -892,16 +892,16 @@ static void create_conflict(void)
memset(&entry, 0x0, sizeof(git_index_entry));
entry.mode = 0100644;
entry.flags = 1 << GIT_IDXENTRY_STAGESHIFT;
- git_oid_fromstr(&entry.oid, "d427e0b2e138501a3d15cc376077a3631e15bd46");
+ git_oid_fromstr(&entry.id, "d427e0b2e138501a3d15cc376077a3631e15bd46");
entry.path = "conflicts.txt";
cl_git_pass(git_index_add(index, &entry));
entry.flags = 2 << GIT_IDXENTRY_STAGESHIFT;
- git_oid_fromstr(&entry.oid, "ee3fa1b8c00aff7fe02065fdb50864bb0d932ccf");
+ git_oid_fromstr(&entry.id, "ee3fa1b8c00aff7fe02065fdb50864bb0d932ccf");
cl_git_pass(git_index_add(index, &entry));
entry.flags = 3 << GIT_IDXENTRY_STAGESHIFT;
- git_oid_fromstr(&entry.oid, "2bd0a343aeef7a2cf0d158478966a6e587ff3863");
+ git_oid_fromstr(&entry.id, "2bd0a343aeef7a2cf0d158478966a6e587ff3863");
cl_git_pass(git_index_add(index, &entry));
git_index_write(index);
diff --git a/tests/diff/iterator.c b/tests/diff/iterator.c
index bbdae8a..92e6f72 100644
--- a/tests/diff/iterator.c
+++ b/tests/diff/iterator.c
@@ -377,7 +377,7 @@ static void index_iterator_test(
if (expected_oids != NULL) {
git_oid oid;
cl_git_pass(git_oid_fromstr(&oid, expected_oids[count]));
- cl_assert_equal_i(git_oid_cmp(&oid, &entry->oid), 0);
+ cl_assert_equal_i(git_oid_cmp(&oid, &entry->id), 0);
}
count++;
diff --git a/tests/filter/custom.c b/tests/filter/custom.c
index a81885c..7052401 100644
--- a/tests/filter/custom.c
+++ b/tests/filter/custom.c
@@ -299,7 +299,7 @@ void test_filter_custom__order_dependency(void)
git_index_free(index);
cl_git_pass(git_blob_lookup(&blob, g_repo,
- & git_index_get_bypath(index, "hero.1.rev-ident", 0)->oid));
+ & git_index_get_bypath(index, "hero.1.rev-ident", 0)->id));
cl_assert_equal_s(
"\n!nuf evaH\n$dI$\ntset a si sihT", git_blob_rawcontent(blob));
cl_git_pass(git_blob_filtered_content(&buf, blob, "hero.1.rev-ident", 0));
@@ -310,7 +310,7 @@ void test_filter_custom__order_dependency(void)
git_blob_free(blob);
cl_git_pass(git_blob_lookup(&blob, g_repo,
- & git_index_get_bypath(index, "hero.2.rev-ident", 0)->oid));
+ & git_index_get_bypath(index, "hero.2.rev-ident", 0)->id));
cl_assert_equal_s(
"\n!yzarC\n$Id$\ntset rehtonA", git_blob_rawcontent(blob));
cl_git_pass(git_blob_filtered_content(&buf, blob, "hero.2.rev-ident", 0));
diff --git a/tests/index/conflicts.c b/tests/index/conflicts.c
index 6311b3a..90aaa44 100644
--- a/tests/index/conflicts.c
+++ b/tests/index/conflicts.c
@@ -47,15 +47,15 @@ void test_index_conflicts__add(void)
ancestor_entry.path = "test-one.txt";
ancestor_entry.flags |= (1 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&ancestor_entry.oid, TEST_ANCESTOR_OID);
+ git_oid_fromstr(&ancestor_entry.id, TEST_ANCESTOR_OID);
our_entry.path = "test-one.txt";
ancestor_entry.flags |= (2 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&our_entry.oid, TEST_OUR_OID);
+ git_oid_fromstr(&our_entry.id, TEST_OUR_OID);
their_entry.path = "test-one.txt";
ancestor_entry.flags |= (3 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&their_entry.oid, TEST_THEIR_OID);
+ git_oid_fromstr(&their_entry.id, TEST_THEIR_OID);
cl_git_pass(git_index_conflict_add(repo_index, &ancestor_entry, &our_entry, &their_entry));
@@ -75,15 +75,15 @@ void test_index_conflicts__add_fixes_incorrect_stage(void)
ancestor_entry.path = "test-one.txt";
ancestor_entry.flags |= (3 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&ancestor_entry.oid, TEST_ANCESTOR_OID);
+ git_oid_fromstr(&ancestor_entry.id, TEST_ANCESTOR_OID);
our_entry.path = "test-one.txt";
ancestor_entry.flags |= (1 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&our_entry.oid, TEST_OUR_OID);
+ git_oid_fromstr(&our_entry.id, TEST_OUR_OID);
their_entry.path = "test-one.txt";
ancestor_entry.flags |= (2 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&their_entry.oid, TEST_THEIR_OID);
+ git_oid_fromstr(&their_entry.id, TEST_THEIR_OID);
cl_git_pass(git_index_conflict_add(repo_index, &ancestor_entry, &our_entry, &their_entry));
@@ -107,13 +107,13 @@ void test_index_conflicts__get(void)
cl_assert_equal_s("conflicts-one.txt", conflict_entry[0]->path);
git_oid_fromstr(&oid, CONFLICTS_ONE_ANCESTOR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[0]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[0]->id, &oid) == 0);
git_oid_fromstr(&oid, CONFLICTS_ONE_OUR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[1]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[1]->id, &oid) == 0);
git_oid_fromstr(&oid, CONFLICTS_ONE_THEIR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[2]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[2]->id, &oid) == 0);
cl_git_pass(git_index_conflict_get(&conflict_entry[0], &conflict_entry[1],
&conflict_entry[2], repo_index, "conflicts-two.txt"));
@@ -121,13 +121,13 @@ void test_index_conflicts__get(void)
cl_assert_equal_s("conflicts-two.txt", conflict_entry[0]->path);
git_oid_fromstr(&oid, CONFLICTS_TWO_ANCESTOR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[0]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[0]->id, &oid) == 0);
git_oid_fromstr(&oid, CONFLICTS_TWO_OUR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[1]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[1]->id, &oid) == 0);
git_oid_fromstr(&oid, CONFLICTS_TWO_THEIR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[2]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[2]->id, &oid) == 0);
}
void test_index_conflicts__iterate(void)
@@ -141,29 +141,29 @@ void test_index_conflicts__iterate(void)
cl_git_pass(git_index_conflict_next(&conflict_entry[0], &conflict_entry[1], &conflict_entry[2], iterator));
git_oid_fromstr(&oid, CONFLICTS_ONE_ANCESTOR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[0]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[0]->id, &oid) == 0);
cl_assert(git__strcmp(conflict_entry[0]->path, "conflicts-one.txt") == 0);
git_oid_fromstr(&oid, CONFLICTS_ONE_OUR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[1]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[1]->id, &oid) == 0);
cl_assert(git__strcmp(conflict_entry[0]->path, "conflicts-one.txt") == 0);
git_oid_fromstr(&oid, CONFLICTS_ONE_THEIR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[2]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[2]->id, &oid) == 0);
cl_assert(git__strcmp(conflict_entry[0]->path, "conflicts-one.txt") == 0);
cl_git_pass(git_index_conflict_next(&conflict_entry[0], &conflict_entry[1], &conflict_entry[2], iterator));
git_oid_fromstr(&oid, CONFLICTS_TWO_ANCESTOR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[0]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[0]->id, &oid) == 0);
cl_assert(git__strcmp(conflict_entry[0]->path, "conflicts-two.txt") == 0);
git_oid_fromstr(&oid, CONFLICTS_TWO_OUR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[1]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[1]->id, &oid) == 0);
cl_assert(git__strcmp(conflict_entry[0]->path, "conflicts-two.txt") == 0);
git_oid_fromstr(&oid, CONFLICTS_TWO_THEIR_OID);
- cl_assert(git_oid_cmp(&conflict_entry[2]->oid, &oid) == 0);
+ cl_assert(git_oid_cmp(&conflict_entry[2]->id, &oid) == 0);
cl_assert(git__strcmp(conflict_entry[0]->path, "conflicts-two.txt") == 0);
cl_assert(git_index_conflict_next(&conflict_entry[0], &conflict_entry[1], &conflict_entry[2], iterator) == GIT_ITEROVER);
@@ -273,7 +273,7 @@ void test_index_conflicts__partial(void)
ancestor_entry.path = "test-one.txt";
ancestor_entry.flags |= (1 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&ancestor_entry.oid, TEST_ANCESTOR_OID);
+ git_oid_fromstr(&ancestor_entry.id, TEST_ANCESTOR_OID);
cl_git_pass(git_index_conflict_add(repo_index, &ancestor_entry, NULL, NULL));
cl_assert(git_index_entrycount(repo_index) == 9);
@@ -281,7 +281,7 @@ void test_index_conflicts__partial(void)
cl_git_pass(git_index_conflict_get(&conflict_entry[0], &conflict_entry[1],
&conflict_entry[2], repo_index, "test-one.txt"));
- cl_assert(git_oid_cmp(&ancestor_entry.oid, &conflict_entry[0]->oid) == 0);
+ cl_assert(git_oid_cmp(&ancestor_entry.id, &conflict_entry[0]->id) == 0);
cl_assert(conflict_entry[1] == NULL);
cl_assert(conflict_entry[2] == NULL);
}
diff --git a/tests/index/rename.c b/tests/index/rename.c
index 4deef13..b6fb61d 100644
--- a/tests/index/rename.c
+++ b/tests/index/rename.c
@@ -27,7 +27,7 @@ void test_index_rename__single_file(void)
cl_assert(!git_index_find(&position, index, "lame.name.txt"));
entry = git_index_get_byindex(index, position);
- cl_assert(git_oid_cmp(&expected, &entry->oid) == 0);
+ cl_assert(git_oid_cmp(&expected, &entry->id) == 0);
/* This removes the entry from the index, but not from the object database */
cl_git_pass(git_index_remove(index, "lame.name.txt", 0));
@@ -41,7 +41,7 @@ void test_index_rename__single_file(void)
cl_assert(!git_index_find(&position, index, "fancy.name.txt"));
entry = git_index_get_byindex(index, position);
- cl_assert(git_oid_cmp(&expected, &entry->oid) == 0);
+ cl_assert(git_oid_cmp(&expected, &entry->id) == 0);
git_index_free(index);
git_repository_free(repo);
diff --git a/tests/index/tests.c b/tests/index/tests.c
index 5a05bd8..bd90bc5 100644
--- a/tests/index/tests.c
+++ b/tests/index/tests.c
@@ -243,11 +243,11 @@ void test_index_tests__add(void)
entry = git_index_get_byindex(index, 0);
/* And the built-in hashing mechanism worked as expected */
- cl_assert(git_oid_cmp(&id1, &entry->oid) == 0);
+ cl_assert(git_oid_cmp(&id1, &entry->id) == 0);
/* Test access by path instead of index */
cl_assert((entry = git_index_get_bypath(index, "test.txt", 0)) != NULL);
- cl_assert(git_oid_cmp(&id1, &entry->oid) == 0);
+ cl_assert(git_oid_cmp(&id1, &entry->id) == 0);
git_index_free(index);
git_repository_free(repo);
@@ -283,14 +283,14 @@ void test_index_tests__add_issue_1397(void)
/* Make sure the initial SHA-1 is correct */
cl_assert((entry = git_index_get_bypath(index, "crlf_file.txt", 0)) != NULL);
- cl_assert_(git_oid_cmp(&id1, &entry->oid) == 0, "first oid check");
+ cl_assert_(git_oid_cmp(&id1, &entry->id) == 0, "first oid check");
/* Update the index */
cl_git_pass(git_index_add_bypath(index, "crlf_file.txt"));
/* Check the new SHA-1 */
cl_assert((entry = git_index_get_bypath(index, "crlf_file.txt", 0)) != NULL);
- cl_assert_(git_oid_cmp(&id1, &entry->oid) == 0, "second oid check");
+ cl_assert_(git_oid_cmp(&id1, &entry->id) == 0, "second oid check");
git_index_free(index);
}
diff --git a/tests/merge/merge_helpers.c b/tests/merge/merge_helpers.c
index 7ce5e28..8d6ef2d 100644
--- a/tests/merge/merge_helpers.c
+++ b/tests/merge/merge_helpers.c
@@ -112,7 +112,7 @@ void merge__dump_index_entries(git_vector *index_entries)
index_entry = index_entries->contents[i];
printf("%o ", index_entry->mode);
- printf("%s ", git_oid_allocfmt(&index_entry->oid));
+ printf("%s ", git_oid_allocfmt(&index_entry->id));
printf("%d ", git_index_entry_stage(index_entry));
printf("%s ", index_entry->path);
printf("\n");
@@ -166,7 +166,7 @@ static int index_entry_eq_merge_index_entry(const struct merge_index_entry *expe
test_oid = 0;
if (actual->mode != expected->mode ||
- (test_oid && git_oid_cmp(&actual->oid, &expected_oid) != 0) ||
+ (test_oid && git_oid_cmp(&actual->id, &expected_oid) != 0) ||
git_index_entry_stage(actual) != expected->stage)
return 0;
diff --git a/tests/merge/trees/automerge.c b/tests/merge/trees/automerge.c
index ebc6e27..bd710e6 100644
--- a/tests/merge/trees/automerge.c
+++ b/tests/merge/trees/automerge.c
@@ -121,7 +121,7 @@ void test_merge_trees_automerge__automerge(void)
cl_assert((entry = git_index_get_bypath(index, "automergeable.txt", 0)) != NULL);
cl_assert(entry->file_size == strlen(AUTOMERGEABLE_MERGED_FILE));
- cl_git_pass(git_object_lookup((git_object **)&blob, repo, &entry->oid, GIT_OBJ_BLOB));
+ cl_git_pass(git_object_lookup((git_object **)&blob, repo, &entry->id, GIT_OBJ_BLOB));
cl_assert(memcmp(git_blob_rawcontent(blob), AUTOMERGEABLE_MERGED_FILE, (size_t)entry->file_size) == 0);
git_index_free(index);
diff --git a/tests/merge/trees/commits.c b/tests/merge/trees/commits.c
index f8f4fba..eeb30da 100644
--- a/tests/merge/trees/commits.c
+++ b/tests/merge/trees/commits.c
@@ -72,7 +72,7 @@ void test_merge_trees_commits__automerge(void)
cl_assert((entry = git_index_get_bypath(index, "automergeable.txt", 0)) != NULL);
cl_assert(entry->file_size == strlen(AUTOMERGEABLE_MERGED_FILE));
- cl_git_pass(git_object_lookup((git_object **)&blob, repo, &entry->oid, GIT_OBJ_BLOB));
+ cl_git_pass(git_object_lookup((git_object **)&blob, repo, &entry->id, GIT_OBJ_BLOB));
cl_assert(memcmp(git_blob_rawcontent(blob), AUTOMERGEABLE_MERGED_FILE, (size_t)entry->file_size) == 0);
git_index_free(index);
diff --git a/tests/merge/trees/trivial.c b/tests/merge/trees/trivial.c
index 2de187b..377b247 100644
--- a/tests/merge/trees/trivial.c
+++ b/tests/merge/trees/trivial.c
@@ -259,7 +259,7 @@ void test_merge_trees_trivial__13(void)
cl_assert(entry = git_index_get_bypath(result, "modified-in-13.txt", 0));
cl_git_pass(git_oid_fromstr(&expected_oid, "1cff9ec6a47a537380dedfdd17c9e76d74259a2b"));
- cl_assert(git_oid_cmp(&entry->oid, &expected_oid) == 0);
+ cl_assert(git_oid_cmp(&entry->id, &expected_oid) == 0);
cl_assert(git_index_reuc_entrycount(result) == 0);
cl_assert(merge_trivial_conflict_entrycount(result) == 0);
@@ -278,7 +278,7 @@ void test_merge_trees_trivial__14(void)
cl_assert(entry = git_index_get_bypath(result, "modified-in-14-branch.txt", 0));
cl_git_pass(git_oid_fromstr(&expected_oid, "26153a3ff3649b6c2bb652d3f06878c6e0a172f9"));
- cl_assert(git_oid_cmp(&entry->oid, &expected_oid) == 0);
+ cl_assert(git_oid_cmp(&entry->id, &expected_oid) == 0);
cl_assert(git_index_reuc_entrycount(result) == 0);
cl_assert(merge_trivial_conflict_entrycount(result) == 0);
diff --git a/tests/merge/workdir/simple.c b/tests/merge/workdir/simple.c
index 6b152cc..266719e 100644
--- a/tests/merge/workdir/simple.c
+++ b/tests/merge/workdir/simple.c
@@ -696,7 +696,7 @@ void test_merge_workdir_simple__binary(void)
cl_assert((binary_entry = git_index_get_bypath(repo_index, "binary", 0)) != NULL);
cl_git_pass(git_oid_fromstr(&our_file_oid, "23ed141a6ae1e798b2f721afedbe947c119111ba"));
- cl_assert(git_oid_cmp(&binary_entry->oid, &our_file_oid) == 0);
+ cl_assert(git_oid_cmp(&binary_entry->id, &our_file_oid) == 0);
git_merge_head_free(their_head);
git_merge_result_free(result);
diff --git a/tests/merge/workdir/trivial.c b/tests/merge/workdir/trivial.c
index 71437d4..a6bbbf0 100644
--- a/tests/merge/workdir/trivial.c
+++ b/tests/merge/workdir/trivial.c
@@ -226,7 +226,7 @@ void test_merge_workdir_trivial__13(void)
cl_assert(entry = git_index_get_bypath(repo_index, "modified-in-13.txt", 0));
cl_git_pass(git_oid_fromstr(&expected_oid, "1cff9ec6a47a537380dedfdd17c9e76d74259a2b"));
- cl_assert(git_oid_cmp(&entry->oid, &expected_oid) == 0);
+ cl_assert(git_oid_cmp(&entry->id, &expected_oid) == 0);
cl_assert(git_index_reuc_entrycount(repo_index) == 0);
cl_assert(merge_trivial_conflict_entrycount() == 0);
@@ -242,7 +242,7 @@ void test_merge_workdir_trivial__14(void)
cl_assert(entry = git_index_get_bypath(repo_index, "modified-in-14-branch.txt", 0));
cl_git_pass(git_oid_fromstr(&expected_oid, "26153a3ff3649b6c2bb652d3f06878c6e0a172f9"));
- cl_assert(git_oid_cmp(&entry->oid, &expected_oid) == 0);
+ cl_assert(git_oid_cmp(&entry->id, &expected_oid) == 0);
cl_assert(git_index_reuc_entrycount(repo_index) == 0);
cl_assert(merge_trivial_conflict_entrycount() == 0);
diff --git a/tests/object/commit/commitstagedfile.c b/tests/object/commit/commitstagedfile.c
index 9867ab4..05a0d16 100644
--- a/tests/object/commit/commitstagedfile.c
+++ b/tests/object/commit/commitstagedfile.c
@@ -77,7 +77,7 @@ void test_object_commit_commitstagedfile__generate_predictable_object_ids(void)
entry = git_index_get_byindex(index, 0);
- cl_assert(git_oid_cmp(&expected_blob_oid, &entry->oid) == 0);
+ cl_assert(git_oid_cmp(&expected_blob_oid, &entry->id) == 0);
/*
* Information about index entry should match test file
diff --git a/tests/object/tree/duplicateentries.c b/tests/object/tree/duplicateentries.c
index 9262f9a..1b752ac 100644
--- a/tests/object/tree/duplicateentries.c
+++ b/tests/object/tree/duplicateentries.c
@@ -127,17 +127,17 @@ static void add_fake_conflicts(git_index *index)
ancestor_entry.path = "duplicate";
ancestor_entry.mode = GIT_FILEMODE_BLOB;
ancestor_entry.flags |= (1 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&ancestor_entry.oid, "a8233120f6ad708f843d861ce2b7228ec4e3dec6");
+ git_oid_fromstr(&ancestor_entry.id, "a8233120f6ad708f843d861ce2b7228ec4e3dec6");
our_entry.path = "duplicate";
our_entry.mode = GIT_FILEMODE_BLOB;
ancestor_entry.flags |= (2 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&our_entry.oid, "45b983be36b73c0788dc9cbcb76cbb80fc7bb057");
+ git_oid_fromstr(&our_entry.id, "45b983be36b73c0788dc9cbcb76cbb80fc7bb057");
their_entry.path = "duplicate";
their_entry.mode = GIT_FILEMODE_BLOB;
ancestor_entry.flags |= (3 << GIT_IDXENTRY_STAGESHIFT);
- git_oid_fromstr(&their_entry.oid, "a71586c1dfe8a71c6cbf6c129f404c5642ff31bd");
+ git_oid_fromstr(&their_entry.id, "a71586c1dfe8a71c6cbf6c129f404c5642ff31bd");
cl_git_pass(git_index_conflict_add(index, &ancestor_entry, &our_entry, &their_entry));
}
diff --git a/tests/reset/default.c b/tests/reset/default.c
index e29e635..57a3f7c 100644
--- a/tests/reset/default.c
+++ b/tests/reset/default.c
@@ -57,7 +57,7 @@ static void assert_content_in_index(
if (!expected_shas)
continue;
- cl_git_pass(git_oid_streq(&entry->oid, expected_shas->strings[i]));
+ cl_git_pass(git_oid_streq(&entry->id, expected_shas->strings[i]));
} else
cl_assert_equal_i(should_exist, error != GIT_ENOTFOUND);
}
diff --git a/tests/reset/hard.c b/tests/reset/hard.c
index 1c0c841..0f80d32 100644
--- a/tests/reset/hard.c
+++ b/tests/reset/hard.c
@@ -111,7 +111,7 @@ static void index_entry_init(git_index *index, int side, git_oid *oid)
entry.path = "conflicting_file";
entry.flags = (side << GIT_IDXENTRY_STAGESHIFT);
entry.mode = 0100644;
- git_oid_cpy(&entry.oid, oid);
+ git_oid_cpy(&entry.id, oid);
cl_git_pass(git_index_add(index, &entry));
}
diff --git a/tests/status/worktree.c b/tests/status/worktree.c
index fd57fcc..def3d60 100644
--- a/tests/status/worktree.c
+++ b/tests/status/worktree.c
@@ -455,15 +455,15 @@ void test_status_worktree__conflict_with_diff3(void)
memset(&their_entry, 0x0, sizeof(git_index_entry));
ancestor_entry.path = "modified_file";
- git_oid_fromstr(&ancestor_entry.oid,
+ git_oid_fromstr(&ancestor_entry.id,
"452e4244b5d083ddf0460acf1ecc74db9dcfa11a");
our_entry.path = "modified_file";
- git_oid_fromstr(&our_entry.oid,
+ git_oid_fromstr(&our_entry.id,
"452e4244b5d083ddf0460acf1ecc74db9dcfa11a");
their_entry.path = "modified_file";
- git_oid_fromstr(&their_entry.oid,
+ git_oid_fromstr(&their_entry.id,
"452e4244b5d083ddf0460acf1ecc74db9dcfa11a");
cl_git_pass(git_status_file(&status, repo, "modified_file"));
@@ -605,15 +605,15 @@ void test_status_worktree__conflicted_item(void)
memset(&their_entry, 0x0, sizeof(git_index_entry));
ancestor_entry.path = "modified_file";
- git_oid_fromstr(&ancestor_entry.oid,
+ git_oid_fromstr(&ancestor_entry.id,
"452e4244b5d083ddf0460acf1ecc74db9dcfa11a");
our_entry.path = "modified_file";
- git_oid_fromstr(&our_entry.oid,
+ git_oid_fromstr(&our_entry.id,
"452e4244b5d083ddf0460acf1ecc74db9dcfa11a");
their_entry.path = "modified_file";
- git_oid_fromstr(&their_entry.oid,
+ git_oid_fromstr(&their_entry.id,
"452e4244b5d083ddf0460acf1ecc74db9dcfa11a");
cl_git_pass(git_status_file(&status, repo, "modified_file"));