rename Git.Filename to Git.Quote

This commit is contained in:
Joey Hess 2023-04-12 17:18:29 -04:00
parent 2a0a0fec8c
commit fe5e586b72
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
15 changed files with 19 additions and 19 deletions

View file

@ -10,7 +10,7 @@ import Annex as X (gitRepo, inRepo, fromRepo, calcRepo, calcRepo')
import Annex.Locations as X import Annex.Locations as X
import Annex.Debug as X (fastDebug, debug) import Annex.Debug as X (fastDebug, debug)
import Messages as X import Messages as X
import Git.Filename as X import Git.Quote as X
#ifndef mingw32_HOST_OS #ifndef mingw32_HOST_OS
import System.Posix.IO as X hiding (createPipe) import System.Posix.IO as X hiding (createPipe)
#endif #endif

View file

@ -15,7 +15,7 @@ import Types
import Types.Key import Types.Key
import qualified Git import qualified Git
import qualified Types.Remote as Remote import qualified Types.Remote as Remote
import Git.Filename import Git.Quote
import Messages import Messages
import Data.Maybe import Data.Maybe

View file

@ -32,7 +32,7 @@ import Utility.LockPool.STM (LockFile, LockMode(..))
import Utility.LockFile.LockStatus import Utility.LockFile.LockStatus
import Config (pidLockFile) import Config (pidLockFile)
import Messages (warning) import Messages (warning)
import Git.Filename import Git.Quote
import System.Posix import System.Posix

View file

@ -29,7 +29,7 @@ import Git.Sha
import Git.Command import Git.Command
import Git.FilePath import Git.FilePath
import Git.DiffTreeItem import Git.DiffTreeItem
import qualified Git.Filename import qualified Git.Quote
import qualified Git.Ref import qualified Git.Ref
import Utility.Attoparsec import Utility.Attoparsec
@ -133,6 +133,6 @@ parserDiffRaw f = DiffTreeItem
<*> (maybe (fail "bad dstsha") return . extractSha =<< nextword) <*> (maybe (fail "bad dstsha") return . extractSha =<< nextword)
<* A8.char ' ' <* A8.char ' '
<*> A.takeByteString <*> A.takeByteString
<*> pure (asTopFilePath $ fromInternalGitPath $ Git.Filename.unquote f) <*> pure (asTopFilePath $ fromInternalGitPath $ Git.Quote.unquote f)
where where
nextword = A8.takeTill (== ' ') nextword = A8.takeTill (== ' ')

View file

@ -30,7 +30,7 @@ module Git.FilePath (
import Common import Common
import Git import Git
import Git.Filename import Git.Quote
import qualified System.FilePath.ByteString as P import qualified System.FilePath.ByteString as P
import qualified System.FilePath.Posix.ByteString import qualified System.FilePath.Posix.ByteString

View file

@ -23,7 +23,7 @@ import Common
import Git import Git
import Git.Command import Git.Command
import Git.FilePath import Git.FilePath
import qualified Git.Filename import qualified Git.Quote
import Utility.Attoparsec import Utility.Attoparsec
import Numeric import Numeric
@ -137,7 +137,7 @@ parserLsTree long = case long of
-- sha -- sha
<*> (Ref <$> A8.takeTill A8.isSpace) <*> (Ref <$> A8.takeTill A8.isSpace)
fileparser = asTopFilePath . Git.Filename.unquote <$> A.takeByteString fileparser = asTopFilePath . Git.Quote.unquote <$> A.takeByteString
sizeparser = fmap Just A8.decimal sizeparser = fmap Just A8.decimal

View file

@ -8,7 +8,7 @@
{-# LANGUAGE OverloadedStrings, TypeSynonymInstances #-} {-# LANGUAGE OverloadedStrings, TypeSynonymInstances #-}
module Git.Filename ( module Git.Quote (
unquote, unquote,
quote, quote,
noquote, noquote,

View file

@ -14,7 +14,7 @@ import Types.Transfer
import Types.ActionItem import Types.ActionItem
import Annex.Common import Annex.Common
import qualified Git import qualified Git
import qualified Git.Filename import qualified Git.Quote
import Utility.Metered import Utility.Metered
import Utility.Percentage import Utility.Percentage
import Utility.PID import Utility.PID
@ -32,7 +32,7 @@ import Control.Concurrent.STM
import qualified Data.ByteString.Char8 as B8 import qualified Data.ByteString.Char8 as B8
import qualified System.FilePath.ByteString as P import qualified System.FilePath.ByteString as P
describeTransfer :: Git.Filename.QuotePath -> Transfer -> TransferInfo -> String describeTransfer :: Git.Quote.QuotePath -> Transfer -> TransferInfo -> String
describeTransfer qp t info = unwords describeTransfer qp t info = unwords
[ show $ transferDirection t [ show $ transferDirection t
, show $ transferUUID t , show $ transferUUID t

View file

@ -69,7 +69,7 @@ import Messages.Concurrent
import Annex.Debug import Annex.Debug
import Annex.Concurrent.Utility import Annex.Concurrent.Utility
import Utility.SafeOutput import Utility.SafeOutput
import Git.Filename import Git.Quote
import qualified Messages.JSON as JSON import qualified Messages.JSON as JSON
import qualified Annex import qualified Annex

View file

@ -13,7 +13,7 @@ import Types.Messages
import Messages.Concurrent import Messages.Concurrent
import qualified Messages.JSON as JSON import qualified Messages.JSON as JSON
import Messages.JSON (JSONBuilder) import Messages.JSON (JSONBuilder)
import Git.Filename import Git.Quote
import Types.GitConfig import Types.GitConfig
import qualified Data.ByteString as S import qualified Data.ByteString as S

View file

@ -21,7 +21,7 @@ import Messages.Internal
import Messages.Progress import Messages.Progress
import qualified Messages.JSON as JSON import qualified Messages.JSON as JSON
import Utility.Metered (BytesProcessed, setMeterTotalSize) import Utility.Metered (BytesProcessed, setMeterTotalSize)
import Git.Filename import Git.Quote
import Control.Monad.IO.Class (MonadIO) import Control.Monad.IO.Class (MonadIO)

View file

@ -30,7 +30,7 @@ import qualified Utility.RawFilePath as R
import qualified Utility.ShellEscape import qualified Utility.ShellEscape
import qualified Annex import qualified Annex
import qualified Git.Filename import qualified Git.Quote
import qualified Git.Types import qualified Git.Types
import qualified Git.Ref import qualified Git.Ref
import qualified Git.LsTree import qualified Git.LsTree
@ -151,7 +151,7 @@ tests n crippledfilesystem adjustedbranchok opts =
properties :: TestTree properties :: TestTree
properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck" $ properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck" $
[ testProperty "prop_quote_unquote_roundtrip" Git.Filename.prop_quote_unquote_roundtrip [ testProperty "prop_quote_unquote_roundtrip" Git.Quote.prop_quote_unquote_roundtrip
, testProperty "prop_encode_c_decode_c_roundtrip" Utility.Format.prop_encode_c_decode_c_roundtrip , testProperty "prop_encode_c_decode_c_roundtrip" Utility.Format.prop_encode_c_decode_c_roundtrip
, testProperty "prop_isomorphic_key_encode" Key.prop_isomorphic_key_encode , testProperty "prop_isomorphic_key_encode" Key.prop_isomorphic_key_encode
, testProperty "prop_isomorphic_shellEscape" Utility.ShellEscape.prop_isomorphic_shellEscape , testProperty "prop_isomorphic_shellEscape" Utility.ShellEscape.prop_isomorphic_shellEscape

View file

@ -15,7 +15,7 @@ module Types.ActionItem (
import Key import Key
import Types.Transfer import Types.Transfer
import Git.FilePath import Git.FilePath
import Git.Filename (StringContainingQuotedPath(..)) import Git.Quote (StringContainingQuotedPath(..))
import Utility.FileSystemEncoding import Utility.FileSystemEncoding
data ActionItem data ActionItem

View file

@ -32,7 +32,7 @@ import Git.Types
import Git.ConfigTypes import Git.ConfigTypes
import Git.Remote (isRemoteKey, remoteKeyToRemoteName) import Git.Remote (isRemoteKey, remoteKeyToRemoteName)
import Git.Branch (CommitMode(..)) import Git.Branch (CommitMode(..))
import Git.Filename (QuotePath(..)) import Git.Quote (QuotePath(..))
import Utility.DataUnits import Utility.DataUnits
import Config.Cost import Config.Cost
import Types.UUID import Types.UUID

View file

@ -856,7 +856,6 @@ Executable git-annex
Git.Env Git.Env
Git.FileMode Git.FileMode
Git.FilePath Git.FilePath
Git.Filename
Git.FilterProcess Git.FilterProcess
Git.Fsck Git.Fsck
Git.GCrypt Git.GCrypt
@ -871,6 +870,7 @@ Executable git-annex
Git.Objects Git.Objects
Git.PktLine Git.PktLine
Git.Queue Git.Queue
Git.Quote
Git.Ref Git.Ref
Git.RefLog Git.RefLog
Git.Remote Git.Remote