refdb: reorder parameters for consistency
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 2236027..3481bac 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -858,16 +858,17 @@ static int refdb_fs_backend__write_tail(
const git_reference *ref,
git_filebuf *file,
int update_reflog,
- const git_signature *who,
- const char *message,
const git_oid *old_id,
- const char *old_target);
+ const char *old_target,
+ const git_signature *who,
+ const char *message);
static int refdb_fs_backend__delete_tail(
git_refdb_backend *_backend,
git_filebuf *file,
const char *ref_name,
- const git_oid *old_id, const char *old_target);
+ const git_oid *old_id,
+ const char *old_target);
static int refdb_fs_backend__unlock(git_refdb_backend *backend, void *payload, int success, int update_reflog,
const git_reference *ref, const git_signature *sig, const char *message)
@@ -878,7 +879,7 @@ static int refdb_fs_backend__unlock(git_refdb_backend *backend, void *payload, i
if (success == 2)
error = refdb_fs_backend__delete_tail(backend, lock, ref->name, NULL, NULL);
else if (success)
- error = refdb_fs_backend__write_tail(backend, ref, lock, update_reflog, sig, message, NULL, NULL);
+ error = refdb_fs_backend__write_tail(backend, ref, lock, update_reflog, NULL, NULL, sig, message);
else
git_filebuf_cleanup(lock);
@@ -1291,7 +1292,7 @@ static int refdb_fs_backend__write(
if ((error = loose_lock(&file, backend, ref->name)) < 0)
return error;
- return refdb_fs_backend__write_tail(_backend, ref, &file, true, who, message, old_id, old_target);
+ return refdb_fs_backend__write_tail(_backend, ref, &file, true, old_id, old_target, who, message);
}
static int refdb_fs_backend__write_tail(
@@ -1299,10 +1300,10 @@ static int refdb_fs_backend__write_tail(
const git_reference *ref,
git_filebuf *file,
int update_reflog,
- const git_signature *who,
- const char *message,
const git_oid *old_id,
- const char *old_target)
+ const char *old_target,
+ const git_signature *who,
+ const char *message)
{
refdb_fs_backend *backend = GIT_CONTAINER_OF(_backend, refdb_fs_backend, parent);
int error = 0, cmp = 0, should_write;