diff options
author | David Turner <dturner@twopensource.com> | 2015-11-10 12:42:39 +0100 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2015-11-20 04:52:01 -0500 |
commit | 5f3c3a4e6f11dedad93d9f5bb2caa85c684db54a (patch) | |
tree | e83ce9f7866a76a2aba084b794635bf37641df85 /refs/files-backend.c | |
parent | initdb: make safe_create_dir public (diff) | |
download | tgif-5f3c3a4e6f11dedad93d9f5bb2caa85c684db54a.tar.xz |
files_log_ref_write: new function
Because HEAD and stash are per-worktree, every refs backend needs to
go through the files backend to write these refs.
So create a new function, files_log_ref_write, and add it to
refs/refs-internal.h. Later, we will use this to handle reflog updates
for per-worktree symbolic refs (HEAD).
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'refs/files-backend.c')
-rw-r--r-- | refs/files-backend.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 14ec506c17..aaf263956c 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2734,6 +2734,14 @@ static int log_ref_write(const char *refname, const unsigned char *old_sha1, const unsigned char *new_sha1, const char *msg, int flags, struct strbuf *err) { + return files_log_ref_write(refname, old_sha1, new_sha1, msg, flags, + err); +} + +int files_log_ref_write(const char *refname, const unsigned char *old_sha1, + const unsigned char *new_sha1, const char *msg, + int flags, struct strbuf *err) +{ struct strbuf sb = STRBUF_INIT; int ret = log_ref_write_1(refname, old_sha1, new_sha1, msg, &sb, flags, err); |