summaryrefslogtreecommitdiff
path: root/src/refdb_fs.c
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2018-03-11 15:35:56 +0100
committerSven Strickroth <email@cs-ware.de>2018-03-27 19:04:05 +0200
commiteb0a3afdbfeca211b1db81dd85e3716fcd333206 (patch)
tree12a19272e1090af45557af34f5be6d835490cb53 /src/refdb_fs.c
parent2a11eaf3de0fd3fd4717ce72d489954a677f4ede (diff)
downloadlibgit2-eb0a3afdbfeca211b1db81dd85e3716fcd333206.tar.gz
worktree: Read worktree specific reflog for HEAD
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'src/refdb_fs.c')
-rw-r--r--src/refdb_fs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 140879d23..9432df8c9 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -1603,6 +1603,8 @@ static int create_new_reflog_file(const char *filepath)
GIT_INLINE(int) retrieve_reflog_path(git_buf *path, git_repository *repo, const char *name)
{
+ if (strcmp(name, GIT_HEAD_FILE) == 0)
+ return git_buf_join3(path, '/', repo->gitdir, GIT_REFLOG_DIR, name);
return git_buf_join3(path, '/', repo->commondir, GIT_REFLOG_DIR, name);
}