From a885c93b5c2975352d7c61b330be04a270c9062f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 10 May 2018 12:43:01 +0000 Subject: sha1-name.c: move around the collect_ambiguous() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- sha1-name.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index cd3b133aae..9d7bbd3e96 100644 --- a/sha1-name.c +++ b/sha1-name.c @@ -372,6 +372,12 @@ static int show_ambiguous_object(const struct object_id *oid, void *data) return 0; } +static int collect_ambiguous(const struct object_id *oid, void *data) +{ + oid_array_append(data, oid); + return 0; +} + static int get_short_oid(const char *name, int len, struct object_id *oid, unsigned flags) { @@ -421,12 +427,6 @@ static int get_short_oid(const char *name, int len, struct object_id *oid, return status; } -static int collect_ambiguous(const struct object_id *oid, void *data) -{ - oid_array_append(data, oid); - return 0; -} - int for_each_abbrev(const char *prefix, each_abbrev_fn fn, void *cb_data) { struct oid_array collect = OID_ARRAY_INIT; -- cgit v1.2.3