Git fork

refs: add referent to each_ref_fn

Add a parameter to each_ref_fn so that callers to the ref APIs
that use this function as a callback can have acess to the
unresolved value of a symbolic ref.

Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

John Cai and committed by
Junio C Hamano
e8207717 cfd97152

+78 -54
+2 -1
bisect.c
··· 448 448 clear_commit_weight(&commit_weight); 449 449 } 450 450 451 - static int register_ref(const char *refname, const struct object_id *oid, 451 + static int register_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 452 452 int flags UNUSED, void *cb_data UNUSED) 453 453 { 454 454 struct strbuf good_prefix = STRBUF_INIT; ··· 1170 1170 } 1171 1171 1172 1172 static int mark_for_removal(const char *refname, 1173 + const char *referent UNUSED, 1173 1174 const struct object_id *oid UNUSED, 1174 1175 int flag UNUSED, void *cb_data) 1175 1176 {
+3 -1
builtin/bisect.c
··· 356 356 } 357 357 358 358 static int inc_nr(const char *refname UNUSED, 359 + const char *referent UNUSED, 359 360 const struct object_id *oid UNUSED, 360 361 int flag UNUSED, void *cb_data) 361 362 { ··· 545 546 return res; 546 547 } 547 548 548 - static int add_bisect_ref(const char *refname, const struct object_id *oid, 549 + static int add_bisect_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 549 550 int flags UNUSED, void *cb) 550 551 { 551 552 struct add_bisect_ref_data *data = cb; ··· 1162 1163 } 1163 1164 1164 1165 static int get_first_good(const char *refname UNUSED, 1166 + const char *referent UNUSED, 1165 1167 const struct object_id *oid, 1166 1168 int flag UNUSED, void *cb_data) 1167 1169 {
+1 -1
builtin/checkout.c
··· 1045 1045 report_tracking(new_branch_info); 1046 1046 } 1047 1047 1048 - static int add_pending_uninteresting_ref(const char *refname, 1048 + static int add_pending_uninteresting_ref(const char *refname, const char *referent UNUSED, 1049 1049 const struct object_id *oid, 1050 1050 int flags UNUSED, void *cb_data) 1051 1051 {
+1 -1
builtin/describe.c
··· 149 149 } 150 150 } 151 151 152 - static int get_name(const char *path, const struct object_id *oid, 152 + static int get_name(const char *path, const char *referent UNUSED, const struct object_id *oid, 153 153 int flag UNUSED, void *cb_data UNUSED) 154 154 { 155 155 int is_tag = 0;
+2 -1
builtin/fetch.c
··· 286 286 return ent; 287 287 } 288 288 289 - static int add_one_refname(const char *refname, 289 + static int add_one_refname(const char *refname, const char *referent UNUSED, 290 290 const struct object_id *oid, 291 291 int flag UNUSED, void *cbdata) 292 292 { ··· 1464 1464 1465 1465 1466 1466 static int add_oid(const char *refname UNUSED, 1467 + const char *referent UNUSED, 1467 1468 const struct object_id *oid, 1468 1469 int flags UNUSED, void *cb_data) 1469 1470 {
+2 -2
builtin/fsck.c
··· 521 521 return 0; 522 522 } 523 523 524 - static int fsck_handle_ref(const char *refname, const struct object_id *oid, 524 + static int fsck_handle_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 525 525 int flag UNUSED, void *cb_data UNUSED) 526 526 { 527 527 struct object *obj; ··· 576 576 strbuf_worktree_ref(wt, &ref, "HEAD"); 577 577 fsck_head_link(ref.buf, &head_points_at, &head_oid); 578 578 if (head_points_at && !is_null_oid(&head_oid)) 579 - fsck_handle_ref(ref.buf, &head_oid, 0, NULL); 579 + fsck_handle_ref(ref.buf, NULL, &head_oid, 0, NULL); 580 580 strbuf_release(&ref); 581 581 582 582 if (include_reflogs)
+1
builtin/gc.c
··· 836 836 }; 837 837 838 838 static int dfs_on_ref(const char *refname UNUSED, 839 + const char *referent UNUSED, 839 840 const struct object_id *oid, 840 841 int flags UNUSED, 841 842 void *cb_data)
+1 -1
builtin/name-rev.c
··· 337 337 return a->taggerdate != b->taggerdate; 338 338 } 339 339 340 - static int name_ref(const char *path, const struct object_id *oid, 340 + static int name_ref(const char *path, const char *referent UNUSED, const struct object_id *oid, 341 341 int flags UNUSED, void *cb_data) 342 342 { 343 343 struct object *o = parse_object(the_repository, oid);
+3 -2
builtin/pack-objects.c
··· 771 771 return WRITE_ONE_WRITTEN; 772 772 } 773 773 774 - static int mark_tagged(const char *path UNUSED, const struct object_id *oid, 774 + static int mark_tagged(const char *path UNUSED, const char *referent UNUSED, const struct object_id *oid, 775 775 int flag UNUSED, void *cb_data UNUSED) 776 776 { 777 777 struct object_id peeled; ··· 3129 3129 } 3130 3130 } 3131 3131 3132 - static int add_ref_tag(const char *tag UNUSED, const struct object_id *oid, 3132 + static int add_ref_tag(const char *tag UNUSED, const char *referent UNUSED, const struct object_id *oid, 3133 3133 int flag UNUSED, void *cb_data UNUSED) 3134 3134 { 3135 3135 struct object_id peeled; ··· 4076 4076 } 4077 4077 4078 4078 static int mark_bitmap_preferred_tip(const char *refname, 4079 + const char *referent UNUSED, 4079 4080 const struct object_id *oid, 4080 4081 int flags UNUSED, 4081 4082 void *data UNUSED)
+1 -1
builtin/receive-pack.c
··· 300 300 } 301 301 } 302 302 303 - static int show_ref_cb(const char *path_full, const struct object_id *oid, 303 + static int show_ref_cb(const char *path_full, const char *referent UNUSED, const struct object_id *oid, 304 304 int flag UNUSED, void *data) 305 305 { 306 306 struct oidset *seen = data;
+3 -1
builtin/remote.c
··· 543 543 }; 544 544 545 545 static int add_branch_for_removal(const char *refname, 546 + const char *referent UNUSED, 546 547 const struct object_id *oid UNUSED, 547 548 int flags UNUSED, void *cb_data) 548 549 { ··· 585 586 uint32_t symrefs_nr; 586 587 }; 587 588 588 - static int read_remote_branches(const char *refname, 589 + static int read_remote_branches(const char *refname, const char *referent UNUSED, 589 590 const struct object_id *oid UNUSED, 590 591 int flags UNUSED, void *cb_data) 591 592 { ··· 971 972 } 972 973 973 974 static int append_ref_to_tracked_list(const char *refname, 975 + const char *referent UNUSED, 974 976 const struct object_id *oid UNUSED, 975 977 int flags, void *cb_data) 976 978 {
+1
builtin/repack.c
··· 667 667 }; 668 668 669 669 static int midx_snapshot_ref_one(const char *refname UNUSED, 670 + const char *referent UNUSED, 670 671 const struct object_id *oid, 671 672 int flag UNUSED, void *_data) 672 673 {
+1
builtin/replace.c
··· 49 49 }; 50 50 51 51 static int show_reference(const char *refname, 52 + const char *referent UNUSED, 52 53 const struct object_id *oid, 53 54 int flag UNUSED, void *cb_data) 54 55 {
+2 -2
builtin/rev-parse.c
··· 211 211 return 0; 212 212 } 213 213 214 - static int show_reference(const char *refname, const struct object_id *oid, 214 + static int show_reference(const char *refname, const char *referent UNUSED, const struct object_id *oid, 215 215 int flag UNUSED, void *cb_data UNUSED) 216 216 { 217 217 if (ref_excluded(&ref_excludes, refname)) ··· 220 220 return 0; 221 221 } 222 222 223 - static int anti_reference(const char *refname, const struct object_id *oid, 223 + static int anti_reference(const char *refname, const char *referent UNUSED, const struct object_id *oid, 224 224 int flag UNUSED, void *cb_data UNUSED) 225 225 { 226 226 show_rev(REVERSED, oid, refname);
+4 -4
builtin/show-branch.c
··· 410 410 return 0; 411 411 } 412 412 413 - static int append_head_ref(const char *refname, const struct object_id *oid, 413 + static int append_head_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 414 414 int flag UNUSED, void *cb_data UNUSED) 415 415 { 416 416 struct object_id tmp; ··· 425 425 return append_ref(refname + ofs, oid, 0); 426 426 } 427 427 428 - static int append_remote_ref(const char *refname, const struct object_id *oid, 428 + static int append_remote_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 429 429 int flag UNUSED, void *cb_data UNUSED) 430 430 { 431 431 struct object_id tmp; ··· 451 451 static const char *match_ref_pattern = NULL; 452 452 static int match_ref_slash = 0; 453 453 454 - static int append_matching_ref(const char *refname, const struct object_id *oid, 454 + static int append_matching_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 455 455 int flag, void *cb_data) 456 456 { 457 457 /* we want to allow pattern hold/<asterisk> to show all ··· 468 468 if (wildmatch(match_ref_pattern, tail, 0)) 469 469 return 0; 470 470 if (starts_with(refname, "refs/heads/")) 471 - return append_head_ref(refname, oid, flag, cb_data); 471 + return append_head_ref(refname, NULL, oid, flag, cb_data); 472 472 if (starts_with(refname, "refs/tags/")) 473 473 return append_tag_ref(refname, oid, flag, cb_data); 474 474 return append_ref(refname, oid, 0);
+2 -1
builtin/show-ref.c
··· 63 63 int show_head; 64 64 }; 65 65 66 - static int show_ref(const char *refname, const struct object_id *oid, 66 + static int show_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 67 67 int flag UNUSED, void *cbdata) 68 68 { 69 69 struct show_ref_data *data = cbdata; ··· 97 97 } 98 98 99 99 static int add_existing(const char *refname, 100 + const char *referent UNUSED, 100 101 const struct object_id *oid UNUSED, 101 102 int flag UNUSED, void *cbdata) 102 103 {
+1
builtin/submodule--helper.c
··· 608 608 } 609 609 610 610 static int handle_submodule_head_ref(const char *refname UNUSED, 611 + const char *referent UNUSED, 611 612 const struct object_id *oid, 612 613 int flags UNUSED, 613 614 void *cb_data)
+1
builtin/worktree.c
··· 626 626 * Returns 0 on failure and non-zero on success. 627 627 */ 628 628 static int first_valid_ref(const char *refname UNUSED, 629 + const char *referent UNUSED, 629 630 const struct object_id *oid UNUSED, 630 631 int flags UNUSED, 631 632 void *cb_data UNUSED)
+1
commit-graph.c
··· 1847 1847 }; 1848 1848 1849 1849 static int add_ref_to_set(const char *refname UNUSED, 1850 + const char *referent UNUSED, 1850 1851 const struct object_id *oid, 1851 1852 int flags UNUSED, void *cb_data) 1852 1853 {
+1 -1
delta-islands.c
··· 390 390 rl->hash += sha_core; 391 391 } 392 392 393 - static int find_island_for_ref(const char *refname, const struct object_id *oid, 393 + static int find_island_for_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 394 394 int flags UNUSED, void *cb) 395 395 { 396 396 struct island_load_data *ild = cb;
+2
fetch-pack.c
··· 183 183 } 184 184 185 185 static int rev_list_insert_ref_oid(const char *refname UNUSED, 186 + const char *referent UNUSED, 186 187 const struct object_id *oid, 187 188 int flag UNUSED, 188 189 void *cb_data) ··· 610 611 } 611 612 612 613 static int mark_complete_oid(const char *refname UNUSED, 614 + const char *referent UNUSED, 613 615 const struct object_id *oid, 614 616 int flag UNUSED, 615 617 void *cb_data UNUSED)
+1 -1
help.c
··· 804 804 struct string_list *similar_refs; 805 805 }; 806 806 807 - static int append_similar_ref(const char *refname, 807 + static int append_similar_ref(const char *refname, const char *referent UNUSED, 808 808 const struct object_id *oid UNUSED, 809 809 int flags UNUSED, void *cb_data) 810 810 {
+2 -2
http-backend.c
··· 512 512 exit(1); 513 513 } 514 514 515 - static int show_text_ref(const char *name, const struct object_id *oid, 515 + static int show_text_ref(const char *name, const char *referent UNUSED, const struct object_id *oid, 516 516 int flag UNUSED, void *cb_data) 517 517 { 518 518 const char *name_nons = strip_namespace(name); ··· 568 568 strbuf_release(&buf); 569 569 } 570 570 571 - static int show_head_ref(const char *refname, const struct object_id *oid, 571 + static int show_head_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 572 572 int flag, void *cb_data) 573 573 { 574 574 struct strbuf *buf = cb_data;
+1 -1
log-tree.c
··· 145 145 return 1; 146 146 } 147 147 148 - static int add_ref_decoration(const char *refname, const struct object_id *oid, 148 + static int add_ref_decoration(const char *refname, const char *referent UNUSED, const struct object_id *oid, 149 149 int flags UNUSED, 150 150 void *cb_data) 151 151 {
+2 -2
ls-refs.c
··· 77 77 unsigned unborn : 1; 78 78 }; 79 79 80 - static int send_ref(const char *refname, const struct object_id *oid, 80 + static int send_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 81 81 int flag, void *cb_data) 82 82 { 83 83 struct ls_refs_data *data = cb_data; ··· 135 135 oid_is_null = is_null_oid(&oid); 136 136 if (!oid_is_null || 137 137 (data->unborn && data->symrefs && (flag & REF_ISSYMREF))) 138 - send_ref(namespaced.buf, oid_is_null ? NULL : &oid, flag, data); 138 + send_ref(namespaced.buf, NULL, oid_is_null ? NULL : &oid, flag, data); 139 139 strbuf_release(&namespaced); 140 140 } 141 141
+1 -1
midx-write.c
··· 655 655 trace2_region_leave("midx", "prepare_midx_packing_data", the_repository); 656 656 } 657 657 658 - static int add_ref_to_pending(const char *refname, 658 + static int add_ref_to_pending(const char *refname, const char *referent UNUSED, 659 659 const struct object_id *oid, 660 660 int flag, void *cb_data) 661 661 {
+1 -1
negotiator/default.c
··· 38 38 } 39 39 } 40 40 41 - static int clear_marks(const char *refname, const struct object_id *oid, 41 + static int clear_marks(const char *refname, const char *referent UNUSED, const struct object_id *oid, 42 42 int flag UNUSED, 43 43 void *cb_data UNUSED) 44 44 {
+1 -1
negotiator/skipping.c
··· 75 75 return entry; 76 76 } 77 77 78 - static int clear_marks(const char *refname, const struct object_id *oid, 78 + static int clear_marks(const char *refname, const char *referent UNUSED, const struct object_id *oid, 79 79 int flag UNUSED, 80 80 void *cb_data UNUSED) 81 81 {
+1 -1
notes.c
··· 932 932 return ret; 933 933 } 934 934 935 - static int string_list_add_one_ref(const char *refname, 935 + static int string_list_add_one_ref(const char *refname, const char *referent UNUSED, 936 936 const struct object_id *oid UNUSED, 937 937 int flag UNUSED, void *cb) 938 938 {
+1 -1
object-name.c
··· 1365 1365 struct commit_list **list; 1366 1366 }; 1367 1367 1368 - static int handle_one_ref(const char *path, const struct object_id *oid, 1368 + static int handle_one_ref(const char *path, const char *referent UNUSED, const struct object_id *oid, 1369 1369 int flag UNUSED, 1370 1370 void *cb_data) 1371 1371 {
+1
pseudo-merge.c
··· 201 201 } 202 202 203 203 static int find_pseudo_merge_group_for_ref(const char *refname, 204 + const char *referent UNUSED, 204 205 const struct object_id *oid, 205 206 int flags UNUSED, 206 207 void *_data)
+1 -1
reachable.c
··· 79 79 free_worktrees(worktrees); 80 80 } 81 81 82 - static int add_one_ref(const char *path, const struct object_id *oid, 82 + static int add_one_ref(const char *path, const char *referent UNUSED, const struct object_id *oid, 83 83 int flag, void *cb_data) 84 84 { 85 85 struct rev_info *revs = (struct rev_info *)cb_data;
+2 -2
ref-filter.c
··· 2865 2865 * A call-back given to for_each_ref(). Filter refs and keep them for 2866 2866 * later object processing. 2867 2867 */ 2868 - static int filter_one(const char *refname, const struct object_id *oid, int flag, void *cb_data) 2868 + static int filter_one(const char *refname, const char *referent UNUSED, const struct object_id *oid, int flag, void *cb_data) 2869 2869 { 2870 2870 struct ref_filter_cbdata *ref_cbdata = cb_data; 2871 2871 struct ref_array_item *ref; ··· 2900 2900 } internal; 2901 2901 }; 2902 2902 2903 - static int filter_and_format_one(const char *refname, const struct object_id *oid, int flag, void *cb_data) 2903 + static int filter_and_format_one(const char *refname, const char *referent UNUSED, const struct object_id *oid, int flag, void *cb_data) 2904 2904 { 2905 2905 struct ref_filter_and_format_cbdata *ref_cbdata = cb_data; 2906 2906 struct ref_array_item *ref;
+1
reflog.c
··· 300 300 } 301 301 302 302 static int push_tip_to_list(const char *refname UNUSED, 303 + const char *referent UNUSED, 303 304 const struct object_id *oid, 304 305 int flags, void *cb_data) 305 306 {
+7 -7
refs.c
··· 414 414 NULL, NULL); 415 415 } 416 416 417 - static int for_each_filter_refs(const char *refname, 417 + static int for_each_filter_refs(const char *refname, const char *referent, 418 418 const struct object_id *oid, 419 419 int flags, void *data) 420 420 { ··· 424 424 return 0; 425 425 if (filter->prefix) 426 426 skip_prefix(refname, filter->prefix, &refname); 427 - return filter->fn(refname, oid, flags, filter->cb_data); 427 + return filter->fn(refname, referent, oid, flags, filter->cb_data); 428 428 } 429 429 430 430 struct warn_if_dangling_data { ··· 435 435 const char *msg_fmt; 436 436 }; 437 437 438 - static int warn_if_dangling_symref(const char *refname, 438 + static int warn_if_dangling_symref(const char *refname, const char *referent UNUSED, 439 439 const struct object_id *oid UNUSED, 440 440 int flags, void *cb_data) 441 441 { ··· 506 506 507 507 strbuf_addf(&buf, "%sHEAD", get_git_namespace()); 508 508 if (!refs_read_ref_full(refs, buf.buf, RESOLVE_REF_READING, &oid, &flag)) 509 - ret = fn(buf.buf, &oid, flag, cb_data); 509 + ret = fn(buf.buf, NULL, &oid, flag, cb_data); 510 510 strbuf_release(&buf); 511 511 512 512 return ret; ··· 1547 1547 1548 1548 if (refs_resolve_ref_unsafe(refs, "HEAD", RESOLVE_REF_READING, 1549 1549 &oid, &flag)) 1550 - return fn("HEAD", &oid, flag, cb_data); 1550 + return fn("HEAD", NULL, &oid, flag, cb_data); 1551 1551 1552 1552 return 0; 1553 1553 } ··· 2387 2387 void *cb_data; 2388 2388 }; 2389 2389 2390 - static int do_for_each_reflog_helper(const char *refname, 2390 + static int do_for_each_reflog_helper(const char *refname, const char *referent, 2391 2391 const struct object_id *oid UNUSED, 2392 2392 int flags, 2393 2393 void *cb_data) ··· 2593 2593 struct strbuf *errbuf; 2594 2594 }; 2595 2595 2596 - static int migrate_one_ref(const char *refname, const struct object_id *oid, 2596 + static int migrate_one_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 2597 2597 int flags, void *cb_data) 2598 2598 { 2599 2599 struct migration_data *data = cb_data;
+1 -1
refs.h
··· 298 298 * arguments is only guaranteed to be valid for the duration of a 299 299 * single callback invocation. 300 300 */ 301 - typedef int each_ref_fn(const char *refname, 301 + typedef int each_ref_fn(const char *refname, const char *referent, 302 302 const struct object_id *oid, int flags, void *cb_data); 303 303 304 304 /*
+1 -1
refs/files-backend.c
··· 3044 3044 return 0; 3045 3045 } 3046 3046 3047 - static int ref_present(const char *refname, 3047 + static int ref_present(const char *refname, const char *referent UNUSED, 3048 3048 const struct object_id *oid UNUSED, 3049 3049 int flags UNUSED, 3050 3050 void *cb_data)
+1 -1
refs/iterator.c
··· 450 450 451 451 current_ref_iter = iter; 452 452 while ((ok = ref_iterator_advance(iter)) == ITER_OK) { 453 - retval = fn(iter->refname, iter->oid, iter->flags, cb_data); 453 + retval = fn(iter->refname, iter->referent, iter->oid, iter->flags, cb_data); 454 454 if (retval) { 455 455 /* 456 456 * If ref_iterator_abort() returns ITER_ERROR,
+2 -2
remote.c
··· 2354 2354 return 1; 2355 2355 } 2356 2356 2357 - static int one_local_ref(const char *refname, const struct object_id *oid, 2357 + static int one_local_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 2358 2358 int flag UNUSED, 2359 2359 void *cb_data) 2360 2360 { ··· 2439 2439 struct refspec *rs; 2440 2440 }; 2441 2441 2442 - static int get_stale_heads_cb(const char *refname, const struct object_id *oid, 2442 + static int get_stale_heads_cb(const char *refname, const char *referent UNUSED, const struct object_id *oid, 2443 2443 int flags, void *cb_data) 2444 2444 { 2445 2445 struct stale_heads_info *info = cb_data;
+1
replace-object.c
··· 9 9 #include "commit.h" 10 10 11 11 static int register_replace_ref(const char *refname, 12 + const char *referent UNUSED, 12 13 const struct object_id *oid, 13 14 int flag UNUSED, 14 15 void *cb_data)
+1 -1
revision.c
··· 1648 1648 struct worktree *wt; 1649 1649 }; 1650 1650 1651 - static int handle_one_ref(const char *path, const struct object_id *oid, 1651 + static int handle_one_ref(const char *path, const char *referent UNUSED, const struct object_id *oid, 1652 1652 int flag UNUSED, 1653 1653 void *cb_data) 1654 1654 {
+1 -1
server-info.c
··· 147 147 return ret; 148 148 } 149 149 150 - static int add_info_ref(const char *path, const struct object_id *oid, 150 + static int add_info_ref(const char *path, const char *referent UNUSED, const struct object_id *oid, 151 151 int flag UNUSED, 152 152 void *cb_data) 153 153 {
+2
shallow.c
··· 612 612 } 613 613 614 614 static int mark_uninteresting(const char *refname UNUSED, 615 + const char *referent UNUSED, 615 616 const struct object_id *oid, 616 617 int flags UNUSED, 617 618 void *cb_data UNUSED) ··· 727 728 }; 728 729 729 730 static int add_ref(const char *refname UNUSED, 731 + const char *referent UNUSED, 730 732 const struct object_id *oid, 731 733 int flags UNUSED, 732 734 void *cb_data)
+2
submodule.c
··· 953 953 } 954 954 955 955 static int has_remote(const char *refname UNUSED, 956 + const char *referent UNUSED, 956 957 const struct object_id *oid UNUSED, 957 958 int flags UNUSED, void *cb_data UNUSED) 958 959 { ··· 1273 1274 } 1274 1275 1275 1276 static int append_oid_to_array(const char *ref UNUSED, 1277 + const char *referent UNUSED, 1276 1278 const struct object_id *oid, 1277 1279 int flags UNUSED, void *data) 1278 1280 {
+1 -1
t/helper/test-ref-store.c
··· 156 156 return refs_rename_ref(refs, oldref, newref, logmsg); 157 157 } 158 158 159 - static int each_ref(const char *refname, const struct object_id *oid, 159 + static int each_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 160 160 int flags, void *cb_data UNUSED) 161 161 { 162 162 printf("%s %s 0x%x\n", oid_to_hex(oid), refname, flags);
+4 -4
upload-pack.c
··· 857 857 } 858 858 } 859 859 860 - static int check_ref(const char *refname_full, const struct object_id *oid, 860 + static int check_ref(const char *refname_full, const char *referent UNUSED, const struct object_id *oid, 861 861 int flag, void *cb_data); 862 862 static void deepen(struct upload_pack_data *data, int depth) 863 863 { ··· 1208 1208 return 0; 1209 1209 } 1210 1210 1211 - static int check_ref(const char *refname_full, const struct object_id *oid, 1211 + static int check_ref(const char *refname_full, const char *referent UNUSED,const struct object_id *oid, 1212 1212 int flag UNUSED, void *cb_data) 1213 1213 { 1214 1214 const char *refname = strip_namespace(refname_full); ··· 1276 1276 return; 1277 1277 } 1278 1278 1279 - static int send_ref(const char *refname, const struct object_id *oid, 1279 + static int send_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid, 1280 1280 int flag UNUSED, void *cb_data) 1281 1281 { 1282 1282 write_v0_ref(cb_data, refname, strip_namespace(refname), oid); 1283 1283 return 0; 1284 1284 } 1285 1285 1286 - static int find_symref(const char *refname, 1286 + static int find_symref(const char *refname, const char *referent UNUSED, 1287 1287 const struct object_id *oid UNUSED, 1288 1288 int flag, void *cb_data) 1289 1289 {
+1
walker.c
··· 221 221 } 222 222 223 223 static int mark_complete(const char *path UNUSED, 224 + const char *referent UNUSED, 224 225 const struct object_id *oid, 225 226 int flag UNUSED, 226 227 void *cb_data UNUSED)
+1 -1
worktree.c
··· 546 546 refname.buf, 547 547 RESOLVE_REF_READING, 548 548 &oid, &flag)) 549 - ret = fn(refname.buf, &oid, flag, cb_data); 549 + ret = fn(refname.buf, NULL, &oid, flag, cb_data); 550 550 if (ret) 551 551 break; 552 552 }