Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bare.c | ||
config.c | ||
merge.c | ||
open.c | ||
reflog.c | ||
refs.c | ||
repository.c | ||
submodule.c | ||
worktree.c | ||
worktree_helpers.c | ||
worktree_helpers.h |
The function `git_repository_head_for_worktree` currently uses `git_reference__read_head` to directly read a given worktree's HEAD from the filesystem. This is broken in case the repository uses a different refdb implementation than the filesystem-based one, so let's instead open the worktree as a real repository and use `git_reference_lookup`. This also fixes the case where the worktree's HEAD is not a symref, but a detached HEAD, which would have resulted in an error previously.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
bare.c | Loading commit data... | |
config.c | Loading commit data... | |
merge.c | Loading commit data... | |
open.c | Loading commit data... | |
reflog.c | Loading commit data... | |
refs.c | Loading commit data... | |
repository.c | Loading commit data... | |
submodule.c | Loading commit data... | |
worktree.c | Loading commit data... | |
worktree_helpers.c | Loading commit data... | |
worktree_helpers.h | Loading commit data... |