diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-26 16:32:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-26 16:32:55 -0400 |
commit | 95bd07a3e733d7ef62539423f066f461c83ba36e (patch) | |
tree | 21505bc15f8b091c9c36205391af4ba7ab432658 | |
parent | 4f050ca9b80d0565e408137f2422e808b82cfd11 (diff) |
reorg
-rw-r--r-- | CmdLine/GitAnnexShell.hs | 2 | ||||
-rw-r--r-- | Command/RecvKey.hs | 2 | ||||
-rw-r--r-- | Command/SendKey.hs | 2 | ||||
-rw-r--r-- | Command/TransferInfo.hs | 2 | ||||
-rw-r--r-- | Fields.hs | 35 | ||||
-rw-r--r-- | Remote/Git.hs | 2 | ||||
-rw-r--r-- | Remote/Helper/Ssh.hs | 4 |
7 files changed, 7 insertions, 42 deletions
diff --git a/CmdLine/GitAnnexShell.hs b/CmdLine/GitAnnexShell.hs index c7b5bd1c9..fe75467de 100644 --- a/CmdLine/GitAnnexShell.hs +++ b/CmdLine/GitAnnexShell.hs @@ -16,7 +16,7 @@ import CmdLine import Command import Annex.UUID import Annex (setField) -import Fields +import CmdLine.GitAnnexShell.Fields import Utility.UserInfo import Remote.GCrypt (getGCryptUUID) import qualified Annex diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs index 6964ea5bd..5d2a9c5aa 100644 --- a/Command/RecvKey.hs +++ b/Command/RecvKey.hs @@ -17,7 +17,7 @@ import Annex import Utility.Rsync import Logs.Transfer import Command.SendKey (fieldTransfer) -import qualified Fields +import qualified CmdLine.GitAnnexShell.Fields as Fields import qualified Types.Key import qualified Types.Backend import qualified Backend diff --git a/Command/SendKey.hs b/Command/SendKey.hs index 488480e0a..2215b16b2 100644 --- a/Command/SendKey.hs +++ b/Command/SendKey.hs @@ -13,7 +13,7 @@ import Annex.Content import Annex import Utility.Rsync import Logs.Transfer -import qualified Fields +import qualified CmdLine.GitAnnexShell.Fields as Fields import Utility.Metered def :: [Command] diff --git a/Command/TransferInfo.hs b/Command/TransferInfo.hs index 796503133..8ab577a81 100644 --- a/Command/TransferInfo.hs +++ b/Command/TransferInfo.hs @@ -12,7 +12,7 @@ import Command import Annex.Content import Logs.Transfer import Types.Key -import qualified Fields +import qualified CmdLine.GitAnnexShell.Fields as Fields import Utility.Metered def :: [Command] diff --git a/Fields.hs b/Fields.hs deleted file mode 100644 index ffd273be6..000000000 --- a/Fields.hs +++ /dev/null @@ -1,35 +0,0 @@ -{- git-annex fields - - - - Copyright 2012 Joey Hess <joey@kitenet.net> - - - - Licensed under the GNU GPL version 3 or higher. - -} - -module Fields where - -import Common.Annex -import qualified Annex - -import Data.Char - -{- A field, stored in Annex state, with a value sanity checker. -} -data Field = Field - { fieldName :: String - , fieldCheck :: String -> Bool - } - -getField :: Field -> Annex (Maybe String) -getField = Annex.getField . fieldName - -remoteUUID :: Field -remoteUUID = Field "remoteuuid" $ - -- does it look like a UUID? - all (\c -> isAlphaNum c || c == '-') - -associatedFile :: Field -associatedFile = Field "associatedfile" $ \f -> - -- is the file a safe relative filename? - not (isAbsolute f) && not ("../" `isPrefixOf` f) - -direct :: Field -direct = Field "direct" $ \f -> f == "1" diff --git a/Remote/Git.hs b/Remote/Git.hs index 832263b43..dfda2b4df 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -36,7 +36,7 @@ import Config import Config.Cost import Init import Types.Key -import qualified Fields +import qualified CmdLine.GitAnnexShell.Fields as Fields import Logs.Location import Utility.Metered #ifndef mingw32_HOST_OS diff --git a/Remote/Helper/Ssh.hs b/Remote/Helper/Ssh.hs index 8cf9275a0..964c8355a 100644 --- a/Remote/Helper/Ssh.hs +++ b/Remote/Helper/Ssh.hs @@ -12,8 +12,8 @@ import qualified Git import qualified Git.Url import Annex.UUID import Annex.Ssh -import Fields (Field, fieldName) -import qualified Fields +import CmdLine.GitAnnexShell.Fields (Field, fieldName) +import qualified CmdLine.GitAnnexShell.Fields as Fields import Types.GitConfig import Types.Key import Remote.Helper.Messages |