@@ -85,7 +85,7 @@ static void update_candidates(struct disambiguate_state *ds, const struct object
85
85
/* otherwise, current can be discarded and candidate is still good */
86
86
}
87
87
88
- static int match_sha (unsigned , const unsigned char * , const unsigned char * );
88
+ static int match_hash (unsigned , const unsigned char * , const unsigned char * );
89
89
90
90
static void find_short_object_filename (struct disambiguate_state * ds )
91
91
{
@@ -102,15 +102,15 @@ static void find_short_object_filename(struct disambiguate_state *ds)
102
102
while (!ds -> ambiguous && pos < loose_objects -> nr ) {
103
103
const struct object_id * oid ;
104
104
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 ))
106
106
break ;
107
107
update_candidates (ds , oid );
108
108
pos ++ ;
109
109
}
110
110
}
111
111
}
112
112
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 )
114
114
{
115
115
do {
116
116
if (* a != * b )
@@ -145,7 +145,7 @@ static void unique_in_midx(struct multi_pack_index *m,
145
145
for (i = first ; i < num && !ds -> ambiguous ; i ++ ) {
146
146
struct object_id oid ;
147
147
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 ))
149
149
break ;
150
150
update_candidates (ds , current );
151
151
}
@@ -173,7 +173,7 @@ static void unique_in_pack(struct packed_git *p,
173
173
for (i = first ; i < num && !ds -> ambiguous ; i ++ ) {
174
174
struct object_id oid ;
175
175
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 ))
177
177
break ;
178
178
update_candidates (ds , & oid );
179
179
}
@@ -483,7 +483,7 @@ static enum get_oid_result get_short_oid(struct repository *r,
483
483
if (!quietly && (status == SHORT_NAME_AMBIGUOUS )) {
484
484
struct oid_array collect = OID_ARRAY_INIT ;
485
485
486
- error (_ ("short SHA1 %s is ambiguous" ), ds .hex_pfx );
486
+ error (_ ("short object ID %s is ambiguous" ), ds .hex_pfx );
487
487
488
488
/*
489
489
* 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,
1811
1811
if (!ret )
1812
1812
return ret ;
1813
1813
/*
1814
- * sha1 :path --> object name of path in ent sha1
1814
+ * tree :path --> object name of path in tree
1815
1815
* :path -> object name of absolute path in index
1816
1816
* :./path -> object name of path relative to cwd in index
1817
1817
* :[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,
1949
1949
struct object_context * oc )
1950
1950
{
1951
1951
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 " );
1953
1953
return get_oid_with_context_1 (repo , str , flags , NULL , oid , oc );
1954
1954
}
0 commit comments