@@ -384,14 +384,6 @@ char *refs_resolve_refdup(struct ref_store *refs,
384
384
return xstrdup_or_null (result );
385
385
}
386
386
387
- char * resolve_refdup (const char * refname , int resolve_flags ,
388
- struct object_id * oid , int * flags )
389
- {
390
- return refs_resolve_refdup (get_main_ref_store (the_repository ),
391
- refname , resolve_flags ,
392
- oid , flags );
393
- }
394
-
395
387
/* The argument to for_each_filter_refs */
396
388
struct for_each_ref_filter {
397
389
const char * pattern ;
@@ -409,33 +401,17 @@ int refs_read_ref_full(struct ref_store *refs, const char *refname,
409
401
return -1 ;
410
402
}
411
403
412
- int read_ref_full (const char * refname , int resolve_flags , struct object_id * oid , int * flags )
413
- {
414
- return refs_read_ref_full (get_main_ref_store (the_repository ), refname ,
415
- resolve_flags , oid , flags );
416
- }
417
-
418
404
int refs_read_ref (struct ref_store * refs , const char * refname , struct object_id * oid )
419
405
{
420
406
return refs_read_ref_full (refs , refname , RESOLVE_REF_READING , oid , NULL );
421
407
}
422
408
423
- int read_ref (const char * refname , struct object_id * oid )
424
- {
425
- return refs_read_ref (get_main_ref_store (the_repository ), refname , oid );
426
- }
427
-
428
409
int refs_ref_exists (struct ref_store * refs , const char * refname )
429
410
{
430
411
return !!refs_resolve_ref_unsafe (refs , refname , RESOLVE_REF_READING ,
431
412
NULL , NULL );
432
413
}
433
414
434
- int ref_exists (const char * refname )
435
- {
436
- return refs_ref_exists (get_main_ref_store (the_repository ), refname );
437
- }
438
-
439
415
static int for_each_filter_refs (const char * refname ,
440
416
const struct object_id * oid ,
441
417
int flags , void * data )
@@ -530,31 +506,16 @@ int refs_for_each_tag_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
530
506
return refs_for_each_ref_in (refs , "refs/tags/" , fn , cb_data );
531
507
}
532
508
533
- int for_each_tag_ref (each_ref_fn fn , void * cb_data )
534
- {
535
- return refs_for_each_tag_ref (get_main_ref_store (the_repository ), fn , cb_data );
536
- }
537
-
538
509
int refs_for_each_branch_ref (struct ref_store * refs , each_ref_fn fn , void * cb_data )
539
510
{
540
511
return refs_for_each_ref_in (refs , "refs/heads/" , fn , cb_data );
541
512
}
542
513
543
- int for_each_branch_ref (each_ref_fn fn , void * cb_data )
544
- {
545
- return refs_for_each_branch_ref (get_main_ref_store (the_repository ), fn , cb_data );
546
- }
547
-
548
514
int refs_for_each_remote_ref (struct ref_store * refs , each_ref_fn fn , void * cb_data )
549
515
{
550
516
return refs_for_each_ref_in (refs , "refs/remotes/" , fn , cb_data );
551
517
}
552
518
553
- int for_each_remote_ref (each_ref_fn fn , void * cb_data )
554
- {
555
- return refs_for_each_remote_ref (get_main_ref_store (the_repository ), fn , cb_data );
556
- }
557
-
558
519
int refs_head_ref_namespaced (struct ref_store * refs , each_ref_fn fn , void * cb_data )
559
520
{
560
521
struct strbuf buf = STRBUF_INIT ;
@@ -570,12 +531,6 @@ int refs_head_ref_namespaced(struct ref_store *refs, each_ref_fn fn, void *cb_da
570
531
return ret ;
571
532
}
572
533
573
- int head_ref_namespaced (each_ref_fn fn , void * cb_data )
574
- {
575
- return refs_head_ref_namespaced (get_main_ref_store (the_repository ),
576
- fn , cb_data );
577
- }
578
-
579
534
void normalize_glob_ref (struct string_list_item * item , const char * prefix ,
580
535
const char * pattern )
581
536
{
@@ -632,25 +587,12 @@ int refs_for_each_glob_ref_in(struct ref_store *refs, each_ref_fn fn,
632
587
return ret ;
633
588
}
634
589
635
- int for_each_glob_ref_in (each_ref_fn fn , const char * pattern ,
636
- const char * prefix , void * cb_data )
637
- {
638
- return refs_for_each_glob_ref_in (get_main_ref_store (the_repository ),
639
- fn , pattern , prefix , cb_data );
640
- }
641
-
642
590
int refs_for_each_glob_ref (struct ref_store * refs , each_ref_fn fn ,
643
591
const char * pattern , void * cb_data )
644
592
{
645
593
return refs_for_each_glob_ref_in (refs , fn , pattern , NULL , cb_data );
646
594
}
647
595
648
- int for_each_glob_ref (each_ref_fn fn , const char * pattern , void * cb_data )
649
- {
650
- return refs_for_each_glob_ref (get_main_ref_store (the_repository ),
651
- fn , pattern , cb_data );
652
- }
653
-
654
596
const char * prettify_refname (const char * name )
655
597
{
656
598
if (skip_prefix (name , "refs/heads/" , & name ) ||
@@ -1024,13 +966,6 @@ int refs_delete_ref(struct ref_store *refs, const char *msg,
1024
966
return 0 ;
1025
967
}
1026
968
1027
- int delete_ref (const char * msg , const char * refname ,
1028
- const struct object_id * old_oid , unsigned int flags )
1029
- {
1030
- return refs_delete_ref (get_main_ref_store (the_repository ), msg , refname ,
1031
- old_oid , flags );
1032
- }
1033
-
1034
969
static void copy_reflog_msg (struct strbuf * sb , const char * msg )
1035
970
{
1036
971
char c ;
@@ -1223,11 +1158,6 @@ struct ref_transaction *ref_store_transaction_begin(struct ref_store *refs,
1223
1158
return tr ;
1224
1159
}
1225
1160
1226
- struct ref_transaction * ref_transaction_begin (struct strbuf * err )
1227
- {
1228
- return ref_store_transaction_begin (get_main_ref_store (the_repository ), err );
1229
- }
1230
-
1231
1161
void ref_transaction_free (struct ref_transaction * transaction )
1232
1162
{
1233
1163
size_t i ;
@@ -1396,15 +1326,6 @@ int refs_update_ref(struct ref_store *refs, const char *msg,
1396
1326
return 0 ;
1397
1327
}
1398
1328
1399
- int update_ref (const char * msg , const char * refname ,
1400
- const struct object_id * new_oid ,
1401
- const struct object_id * old_oid ,
1402
- unsigned int flags , enum action_on_err onerr )
1403
- {
1404
- return refs_update_ref (get_main_ref_store (the_repository ), msg , refname , new_oid ,
1405
- old_oid , flags , onerr );
1406
- }
1407
-
1408
1329
/*
1409
1330
* Check that the string refname matches a rule of the form
1410
1331
* "{prefix}%.*s{suffix}". So "foo/bar/baz" would match the rule
@@ -1506,12 +1427,6 @@ char *refs_shorten_unambiguous_ref(struct ref_store *refs,
1506
1427
return xstrdup (refname );
1507
1428
}
1508
1429
1509
- char * shorten_unambiguous_ref (const char * refname , int strict )
1510
- {
1511
- return refs_shorten_unambiguous_ref (get_main_ref_store (the_repository ),
1512
- refname , strict );
1513
- }
1514
-
1515
1430
int parse_hide_refs_config (const char * var , const char * value , const char * section ,
1516
1431
struct strvec * hide_refs )
1517
1432
{
@@ -1630,11 +1545,6 @@ int refs_head_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
1630
1545
return 0 ;
1631
1546
}
1632
1547
1633
- int head_ref (each_ref_fn fn , void * cb_data )
1634
- {
1635
- return refs_head_ref (get_main_ref_store (the_repository ), fn , cb_data );
1636
- }
1637
-
1638
1548
struct ref_iterator * refs_ref_iterator_begin (
1639
1549
struct ref_store * refs ,
1640
1550
const char * prefix ,
@@ -1729,30 +1639,12 @@ int refs_for_each_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
1729
1639
return do_for_each_ref (refs , "" , NULL , fn , 0 , 0 , cb_data );
1730
1640
}
1731
1641
1732
- int for_each_ref (each_ref_fn fn , void * cb_data )
1733
- {
1734
- return refs_for_each_ref (get_main_ref_store (the_repository ), fn , cb_data );
1735
- }
1736
-
1737
1642
int refs_for_each_ref_in (struct ref_store * refs , const char * prefix ,
1738
1643
each_ref_fn fn , void * cb_data )
1739
1644
{
1740
1645
return do_for_each_ref (refs , prefix , NULL , fn , strlen (prefix ), 0 , cb_data );
1741
1646
}
1742
1647
1743
- int for_each_ref_in (const char * prefix , each_ref_fn fn , void * cb_data )
1744
- {
1745
- return refs_for_each_ref_in (get_main_ref_store (the_repository ), prefix , fn , cb_data );
1746
- }
1747
-
1748
- int for_each_fullref_in (const char * prefix ,
1749
- const char * * exclude_patterns ,
1750
- each_ref_fn fn , void * cb_data )
1751
- {
1752
- return refs_for_each_fullref_in (get_main_ref_store (the_repository ),
1753
- prefix , exclude_patterns , fn , cb_data );
1754
- }
1755
-
1756
1648
int refs_for_each_fullref_in (struct ref_store * refs , const char * prefix ,
1757
1649
const char * * exclude_patterns ,
1758
1650
each_ref_fn fn , void * cb_data )
@@ -1780,24 +1672,12 @@ int refs_for_each_namespaced_ref(struct ref_store *refs,
1780
1672
return ret ;
1781
1673
}
1782
1674
1783
- int for_each_namespaced_ref (const char * * exclude_patterns ,
1784
- each_ref_fn fn , void * cb_data )
1785
- {
1786
- return refs_for_each_namespaced_ref (get_main_ref_store (the_repository ),
1787
- exclude_patterns , fn , cb_data );
1788
- }
1789
-
1790
1675
int refs_for_each_rawref (struct ref_store * refs , each_ref_fn fn , void * cb_data )
1791
1676
{
1792
1677
return do_for_each_ref (refs , "" , NULL , fn , 0 ,
1793
1678
DO_FOR_EACH_INCLUDE_BROKEN , cb_data );
1794
1679
}
1795
1680
1796
- int for_each_rawref (each_ref_fn fn , void * cb_data )
1797
- {
1798
- return refs_for_each_rawref (get_main_ref_store (the_repository ), fn , cb_data );
1799
- }
1800
-
1801
1681
int refs_for_each_include_root_refs (struct ref_store * refs , each_ref_fn fn ,
1802
1682
void * cb_data )
1803
1683
{
@@ -2063,13 +1943,6 @@ int refs_init_db(struct ref_store *refs, int flags, struct strbuf *err)
2063
1943
return refs -> be -> init_db (refs , flags , err );
2064
1944
}
2065
1945
2066
- const char * resolve_ref_unsafe (const char * refname , int resolve_flags ,
2067
- struct object_id * oid , int * flags )
2068
- {
2069
- return refs_resolve_ref_unsafe (get_main_ref_store (the_repository ), refname ,
2070
- resolve_flags , oid , flags );
2071
- }
2072
-
2073
1946
int resolve_gitlink_ref (const char * submodule , const char * refname ,
2074
1947
struct object_id * oid )
2075
1948
{
@@ -2323,13 +2196,6 @@ int refs_create_symref(struct ref_store *refs,
2323
2196
return retval ;
2324
2197
}
2325
2198
2326
- int create_symref (const char * ref_target , const char * refs_heads_master ,
2327
- const char * logmsg )
2328
- {
2329
- return refs_create_symref (get_main_ref_store (the_repository ), ref_target ,
2330
- refs_heads_master , logmsg );
2331
- }
2332
-
2333
2199
int ref_update_reject_duplicates (struct string_list * refnames ,
2334
2200
struct strbuf * err )
2335
2201
{
@@ -2623,11 +2489,6 @@ int refs_for_each_reflog(struct ref_store *refs, each_reflog_fn fn, void *cb_dat
2623
2489
do_for_each_reflog_helper , & hp );
2624
2490
}
2625
2491
2626
- int for_each_reflog (each_reflog_fn fn , void * cb_data )
2627
- {
2628
- return refs_for_each_reflog (get_main_ref_store (the_repository ), fn , cb_data );
2629
- }
2630
-
2631
2492
int refs_for_each_reflog_ent_reverse (struct ref_store * refs ,
2632
2493
const char * refname ,
2633
2494
each_reflog_ent_fn fn ,
@@ -2637,58 +2498,28 @@ int refs_for_each_reflog_ent_reverse(struct ref_store *refs,
2637
2498
fn , cb_data );
2638
2499
}
2639
2500
2640
- int for_each_reflog_ent_reverse (const char * refname , each_reflog_ent_fn fn ,
2641
- void * cb_data )
2642
- {
2643
- return refs_for_each_reflog_ent_reverse (get_main_ref_store (the_repository ),
2644
- refname , fn , cb_data );
2645
- }
2646
-
2647
2501
int refs_for_each_reflog_ent (struct ref_store * refs , const char * refname ,
2648
2502
each_reflog_ent_fn fn , void * cb_data )
2649
2503
{
2650
2504
return refs -> be -> for_each_reflog_ent (refs , refname , fn , cb_data );
2651
2505
}
2652
2506
2653
- int for_each_reflog_ent (const char * refname , each_reflog_ent_fn fn ,
2654
- void * cb_data )
2655
- {
2656
- return refs_for_each_reflog_ent (get_main_ref_store (the_repository ), refname ,
2657
- fn , cb_data );
2658
- }
2659
-
2660
2507
int refs_reflog_exists (struct ref_store * refs , const char * refname )
2661
2508
{
2662
2509
return refs -> be -> reflog_exists (refs , refname );
2663
2510
}
2664
2511
2665
- int reflog_exists (const char * refname )
2666
- {
2667
- return refs_reflog_exists (get_main_ref_store (the_repository ), refname );
2668
- }
2669
-
2670
2512
int refs_create_reflog (struct ref_store * refs , const char * refname ,
2671
2513
struct strbuf * err )
2672
2514
{
2673
2515
return refs -> be -> create_reflog (refs , refname , err );
2674
2516
}
2675
2517
2676
- int safe_create_reflog (const char * refname , struct strbuf * err )
2677
- {
2678
- return refs_create_reflog (get_main_ref_store (the_repository ), refname ,
2679
- err );
2680
- }
2681
-
2682
2518
int refs_delete_reflog (struct ref_store * refs , const char * refname )
2683
2519
{
2684
2520
return refs -> be -> delete_reflog (refs , refname );
2685
2521
}
2686
2522
2687
- int delete_reflog (const char * refname )
2688
- {
2689
- return refs_delete_reflog (get_main_ref_store (the_repository ), refname );
2690
- }
2691
-
2692
2523
int refs_reflog_expire (struct ref_store * refs ,
2693
2524
const char * refname ,
2694
2525
unsigned int flags ,
@@ -2702,19 +2533,6 @@ int refs_reflog_expire(struct ref_store *refs,
2702
2533
cleanup_fn , policy_cb_data );
2703
2534
}
2704
2535
2705
- int reflog_expire (const char * refname ,
2706
- unsigned int flags ,
2707
- reflog_expiry_prepare_fn prepare_fn ,
2708
- reflog_expiry_should_prune_fn should_prune_fn ,
2709
- reflog_expiry_cleanup_fn cleanup_fn ,
2710
- void * policy_cb_data )
2711
- {
2712
- return refs_reflog_expire (get_main_ref_store (the_repository ),
2713
- refname , flags ,
2714
- prepare_fn , should_prune_fn ,
2715
- cleanup_fn , policy_cb_data );
2716
- }
2717
-
2718
2536
int initial_ref_transaction_commit (struct ref_transaction * transaction ,
2719
2537
struct strbuf * err )
2720
2538
{
@@ -2793,12 +2611,6 @@ int refs_delete_refs(struct ref_store *refs, const char *logmsg,
2793
2611
return ret ;
2794
2612
}
2795
2613
2796
- int delete_refs (const char * msg , struct string_list * refnames ,
2797
- unsigned int flags )
2798
- {
2799
- return refs_delete_refs (get_main_ref_store (the_repository ), msg , refnames , flags );
2800
- }
2801
-
2802
2614
int refs_rename_ref (struct ref_store * refs , const char * oldref ,
2803
2615
const char * newref , const char * logmsg )
2804
2616
{
@@ -2811,11 +2623,6 @@ int refs_rename_ref(struct ref_store *refs, const char *oldref,
2811
2623
return retval ;
2812
2624
}
2813
2625
2814
- int rename_ref (const char * oldref , const char * newref , const char * logmsg )
2815
- {
2816
- return refs_rename_ref (get_main_ref_store (the_repository ), oldref , newref , logmsg );
2817
- }
2818
-
2819
2626
int refs_copy_existing_ref (struct ref_store * refs , const char * oldref ,
2820
2627
const char * newref , const char * logmsg )
2821
2628
{
@@ -2827,8 +2634,3 @@ int refs_copy_existing_ref(struct ref_store *refs, const char *oldref,
2827
2634
free (msg );
2828
2635
return retval ;
2829
2636
}
2830
-
2831
- int copy_existing_ref (const char * oldref , const char * newref , const char * logmsg )
2832
- {
2833
- return refs_copy_existing_ref (get_main_ref_store (the_repository ), oldref , newref , logmsg );
2834
- }
0 commit comments