@@ -738,11 +738,11 @@ struct read_ref_at_cb {
738738 timestamp_t at_time ;
739739 int cnt ;
740740 int reccnt ;
741- unsigned char * sha1 ;
741+ struct object_id * oid ;
742742 int found_it ;
743743
744- unsigned char osha1 [ 20 ] ;
745- unsigned char nsha1 [ 20 ] ;
744+ struct object_id ooid ;
745+ struct object_id noid ;
746746 int tz ;
747747 timestamp_t date ;
748748 char * * msg ;
@@ -774,25 +774,25 @@ static int read_ref_at_ent(struct object_id *ooid, struct object_id *noid,
774774 * we have not yet updated cb->[n|o]sha1 so they still
775775 * hold the values for the previous record.
776776 */
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 ))
780780 warning ("Log for ref %s has gap after %s." ,
781781 cb -> refname , show_date (cb -> date , cb -> tz , DATE_MODE (RFC2822 )));
782782 }
783783 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 ))
786786 warning ("Log for ref %s unexpectedly ended on %s." ,
787787 cb -> refname , show_date (cb -> date , cb -> tz ,
788788 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 );
791791 cb -> found_it = 1 ;
792792 return 1 ;
793793 }
794- hashcpy ( cb -> osha1 , ooid -> hash );
795- hashcpy ( cb -> nsha1 , noid -> hash );
794+ oidcpy ( & cb -> ooid , ooid );
795+ oidcpy ( & cb -> noid , noid );
796796 if (cb -> cnt > 0 )
797797 cb -> cnt -- ;
798798 return 0 ;
@@ -812,15 +812,15 @@ static int read_ref_at_ent_oldest(struct object_id *ooid, struct object_id *noid
812812 * cb -> cutoff_tz = tz ;
813813 if (cb -> cutoff_cnt )
814814 * 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 );
818818 /* We just want the first entry */
819819 return 1 ;
820820}
821821
822822int 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 ,
824824 timestamp_t * cutoff_time , int * cutoff_tz , int * cutoff_cnt )
825825{
826826 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
833833 cb .cutoff_time = cutoff_time ;
834834 cb .cutoff_tz = cutoff_tz ;
835835 cb .cutoff_cnt = cutoff_cnt ;
836- cb .sha1 = sha1 ;
836+ cb .oid = oid ;
837837
838838 for_each_reflog_ent_reverse (refname , read_ref_at_ent , & cb );
839839
0 commit comments