By moving the functions up we don't need to have to declare them first when using them in a later patch. Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx> --- refs.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/refs.c b/refs.c index 4580919..6f3cd7b 100644 --- a/refs.c +++ b/refs.c @@ -2808,6 +2808,20 @@ static int rename_ref_available(const char *oldname, const char *newname) static int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *logmsg); +static int close_ref(struct ref_lock *lock) +{ + if (close_lock_file(lock->lk)) + return -1; + return 0; +} + +static int commit_ref(struct ref_lock *lock) +{ + if (commit_lock_file(lock->lk)) + return -1; + return 0; +} + int rename_ref(const char *oldrefname, const char *newrefname, const char *logmsg) { unsigned char sha1[20], orig_sha1[20]; @@ -2901,20 +2915,6 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms return 1; } -static int close_ref(struct ref_lock *lock) -{ - if (close_lock_file(lock->lk)) - return -1; - return 0; -} - -static int commit_ref(struct ref_lock *lock) -{ - if (commit_lock_file(lock->lk)) - return -1; - return 0; -} - /* * copy the reflog message msg to buf, which has been allocated sufficiently * large, while cleaning up the whitespaces. Especially, convert LF to space, -- 2.2.1.62.g3f15098 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html