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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed May 10, 2018 at 12:43 UTC a885c93b5c2975352d7c61b330be04a270c9062f
1 file changed +6 -6
sha1-name.c
+6 -6
@@ -372,6 +372,12 @@ static int show_ambiguous_object(const struct object_id *oid, void *data)
372 return 0;
373 }
374
375 +static int collect_ambiguous(const struct object_id *oid, void *data)
376 +{
377 + oid_array_append(data, oid);
378 + return 0;
379 +}
380 +
381 static int get_short_oid(const char *name, int len, struct object_id *oid,
382 unsigned flags)
383 {
@@ -421,12 +427,6 @@ static int get_short_oid(const char *name, int len, struct object_id *oid,
427 return status;
428 }
429
424 -static int collect_ambiguous(const struct object_id *oid, void *data)
425 -{
426 - oid_array_append(data, oid);
427 - return 0;
428 -}
429 -
430 int for_each_abbrev(const char *prefix, each_abbrev_fn fn, void *cb_data)
431 {
432 struct oid_array collect = OID_ARRAY_INIT;