ensure that gitdir is absolute
calcGitLink turns out to need it to be absolute, and it normally is, but not if it's read from a .git file in a submodule, or perhaps from GIT_DIR. I should look into dropping this invariant.
This commit is contained in:
parent
509692847a
commit
4f95cc8ef1
2 changed files with 7 additions and 3 deletions
|
@ -227,7 +227,8 @@ checkForRepo dir =
|
|||
catchDefaultIO "" (readFile $ dir </> ".git")
|
||||
return $ if gitdirprefix `isPrefixOf` c
|
||||
then Just $ Local
|
||||
{ gitdir = drop (length gitdirprefix) c
|
||||
{ gitdir = absPathFrom dir $
|
||||
drop (length gitdirprefix) c
|
||||
, worktree = Just dir
|
||||
}
|
||||
else Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue