@@ -738,11 +738,11 @@ struct read_ref_at_cb {
738
738
timestamp_t at_time ;
739
739
int cnt ;
740
740
int reccnt ;
741
- unsigned char * sha1 ;
741
+ struct object_id * oid ;
742
742
int found_it ;
743
743
744
- unsigned char osha1 [ 20 ] ;
745
- unsigned char nsha1 [ 20 ] ;
744
+ struct object_id ooid ;
745
+ struct object_id noid ;
746
746
int tz ;
747
747
timestamp_t date ;
748
748
char * * msg ;
@@ -774,25 +774,25 @@ static int read_ref_at_ent(struct object_id *ooid, struct object_id *noid,
774
774
* we have not yet updated cb->[n|o]sha1 so they still
775
775
* hold the values for the previous record.
776
776
*/
777
- if (!is_null_sha1 ( cb -> osha1 )) {
778
- hashcpy (cb -> sha1 , noid -> hash );
779
- if (hashcmp ( cb -> osha1 , noid -> hash ))
777
+ if (!is_null_oid ( & cb -> ooid )) {
778
+ oidcpy (cb -> oid , noid );
779
+ if (oidcmp ( & cb -> ooid , noid ))
780
780
warning ("Log for ref %s has gap after %s." ,
781
781
cb -> refname , show_date (cb -> date , cb -> tz , DATE_MODE (RFC2822 )));
782
782
}
783
783
else if (cb -> date == cb -> at_time )
784
- hashcpy (cb -> sha1 , noid -> hash );
785
- else if (hashcmp (noid -> hash , cb -> sha1 ))
784
+ oidcpy (cb -> oid , noid );
785
+ else if (oidcmp (noid , cb -> oid ))
786
786
warning ("Log for ref %s unexpectedly ended on %s." ,
787
787
cb -> refname , show_date (cb -> date , cb -> tz ,
788
788
DATE_MODE (RFC2822 )));
789
- hashcpy ( cb -> osha1 , ooid -> hash );
790
- hashcpy ( cb -> nsha1 , noid -> hash );
789
+ oidcpy ( & cb -> ooid , ooid );
790
+ oidcpy ( & cb -> noid , noid );
791
791
cb -> found_it = 1 ;
792
792
return 1 ;
793
793
}
794
- hashcpy ( cb -> osha1 , ooid -> hash );
795
- hashcpy ( cb -> nsha1 , noid -> hash );
794
+ oidcpy ( & cb -> ooid , ooid );
795
+ oidcpy ( & cb -> noid , noid );
796
796
if (cb -> cnt > 0 )
797
797
cb -> cnt -- ;
798
798
return 0 ;
@@ -812,15 +812,15 @@ static int read_ref_at_ent_oldest(struct object_id *ooid, struct object_id *noid
812
812
* cb -> cutoff_tz = tz ;
813
813
if (cb -> cutoff_cnt )
814
814
* cb -> cutoff_cnt = cb -> reccnt ;
815
- hashcpy (cb -> sha1 , ooid -> hash );
816
- if (is_null_sha1 (cb -> sha1 ))
817
- hashcpy (cb -> sha1 , noid -> hash );
815
+ oidcpy (cb -> oid , ooid );
816
+ if (is_null_oid (cb -> oid ))
817
+ oidcpy (cb -> oid , noid );
818
818
/* We just want the first entry */
819
819
return 1 ;
820
820
}
821
821
822
822
int read_ref_at (const char * refname , unsigned int flags , timestamp_t at_time , int cnt ,
823
- unsigned char * sha1 , char * * msg ,
823
+ struct object_id * oid , char * * msg ,
824
824
timestamp_t * cutoff_time , int * cutoff_tz , int * cutoff_cnt )
825
825
{
826
826
struct read_ref_at_cb cb ;
@@ -833,7 +833,7 @@ int read_ref_at(const char *refname, unsigned int flags, timestamp_t at_time, in
833
833
cb .cutoff_time = cutoff_time ;
834
834
cb .cutoff_tz = cutoff_tz ;
835
835
cb .cutoff_cnt = cutoff_cnt ;
836
- cb .sha1 = sha1 ;
836
+ cb .oid = oid ;
837
837
838
838
for_each_reflog_ent_reverse (refname , read_ref_at_ent , & cb );
839
839
0 commit comments