Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
unlock_ref(): move definition higher in the file
author
Michael Haggerty
<mhagger@alum.mit.edu>
Sun, 24 Apr 2016 06:11:37 +0000
(08:11 +0200)
committer
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 13 Jun 2016 09:23:49 +0000
(11:23 +0200)
This avoids the need for a forward declaration in the next patch.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
refs/files-backend.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
165056b
)
diff --git
a/refs/files-backend.c
b/refs/files-backend.c
index 85751977f6b4988d2f13655986044b55403c1b10..dc0bde05b8608e7299a160d8397987bb5a396c7b 100644
(file)
--- a/
refs/files-backend.c
+++ b/
refs/files-backend.c
@@
-1516,6
+1516,16
@@
int read_raw_ref(const char *refname, unsigned char *sha1,
return ret;
}
return ret;
}
+static void unlock_ref(struct ref_lock *lock)
+{
+ /* Do not free lock->lk -- atexit() still looks at them */
+ if (lock->lk)
+ rollback_lock_file(lock->lk);
+ free(lock->ref_name);
+ free(lock->orig_ref_name);
+ free(lock);
+}
+
/*
* Peel the entry (if possible) and return its new peel_status. If
* repeel is true, re-peel the entry even if there is an old peeled
/*
* Peel the entry (if possible) and return its new peel_status. If
* repeel is true, re-peel the entry even if there is an old peeled
@@
-1674,16
+1684,6
@@
int do_for_each_ref(const char *submodule, const char *base,
return do_for_each_entry(refs, base, do_one_ref, &data);
}
return do_for_each_entry(refs, base, do_one_ref, &data);
}
-static void unlock_ref(struct ref_lock *lock)
-{
- /* Do not free lock->lk -- atexit() still looks at them */
- if (lock->lk)
- rollback_lock_file(lock->lk);
- free(lock->ref_name);
- free(lock->orig_ref_name);
- free(lock);
-}
-
/*
* Verify that the reference locked by lock has the value old_sha1.
* Fail if the reference doesn't exist and mustexist is set. Return 0
/*
* Verify that the reference locked by lock has the value old_sha1.
* Fail if the reference doesn't exist and mustexist is set. Return 0