Skip to content

Commit a885c93

Browse files
avargitster
authored andcommitted
sha1-name.c: move around the collect_ambiguous() function
A subsequent change will make use of this static function in the get_short_oid() function, which is defined above where the collect_ambiguous() function is now. Without this we'd then have a compilation error due to a forward declaration. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 89f32a9 commit a885c93

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sha1-name.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ static int show_ambiguous_object(const struct object_id *oid, void *data)
372372
return 0;
373373
}
374374

375+
static int collect_ambiguous(const struct object_id *oid, void *data)
376+
{
377+
oid_array_append(data, oid);
378+
return 0;
379+
}
380+
375381
static int get_short_oid(const char *name, int len, struct object_id *oid,
376382
unsigned flags)
377383
{
@@ -421,12 +427,6 @@ static int get_short_oid(const char *name, int len, struct object_id *oid,
421427
return status;
422428
}
423429

424-
static int collect_ambiguous(const struct object_id *oid, void *data)
425-
{
426-
oid_array_append(data, oid);
427-
return 0;
428-
}
429-
430430
int for_each_abbrev(const char *prefix, each_abbrev_fn fn, void *cb_data)
431431
{
432432
struct oid_array collect = OID_ARRAY_INIT;

0 commit comments

Comments
 (0)