@@ -85,7 +85,7 @@ static void update_candidates(struct disambiguate_state *ds, const struct object
8585 /* otherwise, current can be discarded and candidate is still good */
8686}
8787
88- static int match_sha (unsigned , const unsigned char * , const unsigned char * );
88+ static int match_hash (unsigned , const unsigned char * , const unsigned char * );
8989
9090static void find_short_object_filename (struct disambiguate_state * ds )
9191{
@@ -102,15 +102,15 @@ static void find_short_object_filename(struct disambiguate_state *ds)
102102 while (!ds -> ambiguous && pos < loose_objects -> nr ) {
103103 const struct object_id * oid ;
104104 oid = loose_objects -> oid + pos ;
105- if (!match_sha (ds -> len , ds -> bin_pfx .hash , oid -> hash ))
105+ if (!match_hash (ds -> len , ds -> bin_pfx .hash , oid -> hash ))
106106 break ;
107107 update_candidates (ds , oid );
108108 pos ++ ;
109109 }
110110 }
111111}
112112
113- static int match_sha (unsigned len , const unsigned char * a , const unsigned char * b )
113+ static int match_hash (unsigned len , const unsigned char * a , const unsigned char * b )
114114{
115115 do {
116116 if (* a != * b )
@@ -145,7 +145,7 @@ static void unique_in_midx(struct multi_pack_index *m,
145145 for (i = first ; i < num && !ds -> ambiguous ; i ++ ) {
146146 struct object_id oid ;
147147 current = nth_midxed_object_oid (& oid , m , i );
148- if (!match_sha (ds -> len , ds -> bin_pfx .hash , current -> hash ))
148+ if (!match_hash (ds -> len , ds -> bin_pfx .hash , current -> hash ))
149149 break ;
150150 update_candidates (ds , current );
151151 }
@@ -173,7 +173,7 @@ static void unique_in_pack(struct packed_git *p,
173173 for (i = first ; i < num && !ds -> ambiguous ; i ++ ) {
174174 struct object_id oid ;
175175 nth_packed_object_id (& oid , p , i );
176- if (!match_sha (ds -> len , ds -> bin_pfx .hash , oid .hash ))
176+ if (!match_hash (ds -> len , ds -> bin_pfx .hash , oid .hash ))
177177 break ;
178178 update_candidates (ds , & oid );
179179 }
@@ -483,7 +483,7 @@ static enum get_oid_result get_short_oid(struct repository *r,
483483 if (!quietly && (status == SHORT_NAME_AMBIGUOUS )) {
484484 struct oid_array collect = OID_ARRAY_INIT ;
485485
486- error (_ ("short SHA1 %s is ambiguous" ), ds .hex_pfx );
486+ error (_ ("short object ID %s is ambiguous" ), ds .hex_pfx );
487487
488488 /*
489489 * We may still have ambiguity if we simply saw a series of
@@ -1811,7 +1811,7 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo,
18111811 if (!ret )
18121812 return ret ;
18131813 /*
1814- * sha1 :path --> object name of path in ent sha1
1814+ * tree :path --> object name of path in tree
18151815 * :path -> object name of absolute path in index
18161816 * :./path -> object name of path relative to cwd in index
18171817 * :[0-3]:path -> object name of path in index at stage
@@ -1949,6 +1949,6 @@ enum get_oid_result get_oid_with_context(struct repository *repo,
19491949 struct object_context * oc )
19501950{
19511951 if (flags & GET_OID_FOLLOW_SYMLINKS && flags & GET_OID_ONLY_TO_DIE )
1952- BUG ("incompatible flags for get_sha1_with_context " );
1952+ BUG ("incompatible flags for get_oid_with_context " );
19531953 return get_oid_with_context_1 (repo , str , flags , NULL , oid , oc );
19541954}
0 commit comments