This commit is contained in:
Joey Hess 2021-03-05 14:17:48 -04:00
parent 1b041f5c51
commit cdd512cd9f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 19 additions and 17 deletions

View file

@ -17,6 +17,8 @@ import qualified Git
import qualified Types.Remote as Remote
import Messages
import Data.Maybe
-- From a sha pointing to the content of a file to the key
-- to use to export it. When the file is annexed, it's the annexed key.
-- When the file is stored in git, it's a special type of key to indicate
@ -48,6 +50,10 @@ keyGitSha k
Just (Git.Ref (fromKey keyName k))
| otherwise = Nothing
-- Is a key storing a git sha, and not used for an annexed file?
isGitShaKey :: Key -> Bool
isGitShaKey = isJust . keyGitSha
warnExportImportConflict :: Remote -> Annex ()
warnExportImportConflict r = do
isimport <- Remote.isImportSupported r