Skip to content

Commit 8fd855f

Browse files
committed
refdb: reorder parameters for consistency
1 parent 9b25cf1 commit 8fd855f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/refdb_fs.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -858,16 +858,17 @@ static int refdb_fs_backend__write_tail(
858858
const git_reference *ref,
859859
git_filebuf *file,
860860
int update_reflog,
861-
const git_signature *who,
862-
const char *message,
863861
const git_oid *old_id,
864-
const char *old_target);
862+
const char *old_target,
863+
const git_signature *who,
864+
const char *message);
865865

866866
static int refdb_fs_backend__delete_tail(
867867
git_refdb_backend *_backend,
868868
git_filebuf *file,
869869
const char *ref_name,
870-
const git_oid *old_id, const char *old_target);
870+
const git_oid *old_id,
871+
const char *old_target);
871872

872873
static int refdb_fs_backend__unlock(git_refdb_backend *backend, void *payload, int success, int update_reflog,
873874
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
878879
if (success == 2)
879880
error = refdb_fs_backend__delete_tail(backend, lock, ref->name, NULL, NULL);
880881
else if (success)
881-
error = refdb_fs_backend__write_tail(backend, ref, lock, update_reflog, sig, message, NULL, NULL);
882+
error = refdb_fs_backend__write_tail(backend, ref, lock, update_reflog, NULL, NULL, sig, message);
882883
else
883884
git_filebuf_cleanup(lock);
884885

@@ -1291,18 +1292,18 @@ static int refdb_fs_backend__write(
12911292
if ((error = loose_lock(&file, backend, ref->name)) < 0)
12921293
return error;
12931294

1294-
return refdb_fs_backend__write_tail(_backend, ref, &file, true, who, message, old_id, old_target);
1295+
return refdb_fs_backend__write_tail(_backend, ref, &file, true, old_id, old_target, who, message);
12951296
}
12961297

12971298
static int refdb_fs_backend__write_tail(
12981299
git_refdb_backend *_backend,
12991300
const git_reference *ref,
13001301
git_filebuf *file,
13011302
int update_reflog,
1302-
const git_signature *who,
1303-
const char *message,
13041303
const git_oid *old_id,
1305-
const char *old_target)
1304+
const char *old_target,
1305+
const git_signature *who,
1306+
const char *message)
13061307
{
13071308
refdb_fs_backend *backend = GIT_CONTAINER_OF(_backend, refdb_fs_backend, parent);
13081309
int error = 0, cmp = 0, should_write;

0 commit comments

Comments
 (0)