Override safe.bareRepository for git remotes
Fix using git remotes that are bare when git is configured with safe.bareRepository = explicit Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
parent
cbfd214993
commit
baf8e4f6ed
7 changed files with 37 additions and 19 deletions
|
@ -339,11 +339,7 @@ tryGitConfigRead autoinit r hasuuid
|
|||
warning $ UnquotedString $ "Remote " ++ Git.repoDescribe r ++
|
||||
": " ++ show e
|
||||
Annex.getState Annex.repo
|
||||
{- Since the path to the repository was specified
|
||||
- explicitly, CVE-2022-24765 is not a concern,
|
||||
- so tell git to treat the repository directory as safe.
|
||||
-}
|
||||
let r' = r { Git.safeDirectory = True }
|
||||
let r' = r { Git.repoPathSpecifiedExplicitly = True }
|
||||
s <- newLocal r'
|
||||
liftIO $ Annex.eval s $ check
|
||||
`finally` quiesce True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue