diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-11-13 18:15:20 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-11-23 14:55:02 +0100 |
commit | a57dd3b7a46c9a2f87f203f1ab372fa28e10e571 (patch) | |
tree | ce76f383edaa14bee45a687453223613c1c1ee9c /include/git2 | |
parent | 110df89317b56267b956574216d6611637860446 (diff) | |
download | libgit2-a57dd3b7a46c9a2f87f203f1ab372fa28e10e571.tar.gz |
reflog: integrate into the ref writing
Whenever a reference is created or updated, we need to write to the
reflog regardless of whether the user gave us a message, so we shouldn't
leave that to the ref frontend, but integrate it into the backend.
This also eliminates the race between ref update and writing to the
reflog, as we protect the reflog with the ref lock.
As an additional benefit, this reflog append on the backend happens by
appending to the file instead of parsing and rewriting it.
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/sys/refdb_backend.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h index d5611d01e..131e1b5d0 100644 --- a/include/git2/sys/refdb_backend.h +++ b/include/git2/sys/refdb_backend.h @@ -94,12 +94,12 @@ struct git_refdb_backend { */ int (*write)(git_refdb_backend *backend, const git_reference *ref, int force, - const char *message); + const git_signature *who, const char *message); int (*rename)( git_reference **out, git_refdb_backend *backend, const char *old_name, const char *new_name, int force, - const char *message); + const git_signature *who, const char *message); /** * Deletes the given reference from the refdb. A refdb implementation |