From f6063a094ec02caec314b42dc05f2f0595ae0ce4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 30 Jun 2011 13:16:57 -0400 Subject: [PATCH] renamed GitRepo to Git It was always imported qualified as Git anyway --- Annex.hs | 2 +- Backend.hs | 2 +- Backend/File.hs | 2 +- Branch.hs | 2 +- CmdLine.hs | 2 +- Command.hs | 4 ++-- Command/DropUnused.hs | 2 +- Command/Init.hs | 2 +- Command/Map.hs | 2 +- Command/Status.hs | 2 +- Command/Unannex.hs | 4 ++-- Command/Uninit.hs | 2 +- Command/Unused.hs | 4 ++-- Config.hs | 2 +- Content.hs | 2 +- GitRepo.hs => Git.hs | 4 ++-- {GitRepo => Git}/LsFiles.hs | 4 ++-- GitAnnex.hs | 2 +- GitQueue.hs | 2 +- GitUnionMerge.hs | 2 +- LocationLog.hs | 2 +- Locations.hs | 2 +- Remote/Bup.hs | 2 +- Remote/Directory.hs | 2 +- Remote/Git.hs | 2 +- Remote/Hook.hs | 2 +- Remote/Rsync.hs | 2 +- Remote/S3real.hs | 2 +- Remote/Special.hs | 2 +- Ssh.hs | 2 +- Types/Remote.hs | 2 +- UUID.hs | 2 +- Upgrade/V1.hs | 4 ++-- Upgrade/V2.hs | 2 +- Version.hs | 2 +- git-annex-shell.hs | 2 +- git-annex.hs | 4 +--- git-union-merge.hs | 2 +- test.hs | 2 +- 39 files changed, 45 insertions(+), 47 deletions(-) rename GitRepo.hs => Git.hs (99%) rename {GitRepo => Git}/LsFiles.hs (98%) diff --git a/Annex.hs b/Annex.hs index 82908881da..e2f4a10206 100644 --- a/Annex.hs +++ b/Annex.hs @@ -18,7 +18,7 @@ module Annex ( import Control.Monad.State -import qualified GitRepo as Git +import qualified Git import GitQueue import Types.Backend import Types.Remote diff --git a/Backend.hs b/Backend.hs index 78a53d02c7..b1cd4c8f0e 100644 --- a/Backend.hs +++ b/Backend.hs @@ -39,7 +39,7 @@ import System.Posix.Files import System.Directory import Locations -import qualified GitRepo as Git +import qualified Git import qualified Annex import Types import Types.Key diff --git a/Backend/File.hs b/Backend/File.hs index 1c25f89db2..b8d3bb65ad 100644 --- a/Backend/File.hs +++ b/Backend/File.hs @@ -20,7 +20,7 @@ import Data.String.Utils import Types.Backend import LocationLog import qualified Remote -import qualified GitRepo as Git +import qualified Git import Content import qualified Annex import Types diff --git a/Branch.hs b/Branch.hs index 5ad89df202..7650fe8619 100644 --- a/Branch.hs +++ b/Branch.hs @@ -30,7 +30,7 @@ import System.IO.Binary import qualified Data.ByteString.Char8 as B import Types.BranchState -import qualified GitRepo as Git +import qualified Git import qualified GitUnionMerge import qualified Annex import Utility diff --git a/CmdLine.hs b/CmdLine.hs index ab7236847f..85423e5e89 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -18,7 +18,7 @@ import Control.Monad (when) import qualified Annex import qualified AnnexQueue -import qualified GitRepo as Git +import qualified Git import Content import Types import Command diff --git a/Command.hs b/Command.hs index 45a4cc70fd..d36f675d24 100644 --- a/Command.hs +++ b/Command.hs @@ -21,8 +21,8 @@ import Types import qualified Backend import Messages import qualified Annex -import qualified GitRepo as Git -import qualified GitRepo.LsFiles as LsFiles +import qualified Git +import qualified Git.LsFiles as LsFiles import Utility import Types.Key diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs index 0f99814471..2125abdc3c 100644 --- a/Command/DropUnused.hs +++ b/Command/DropUnused.hs @@ -20,7 +20,7 @@ import qualified Annex import qualified Command.Drop import qualified Command.Move import qualified Remote -import qualified GitRepo as Git +import qualified Git import Backend import Types.Key import Utility diff --git a/Command/Init.hs b/Command/Init.hs index 8cde8bb9fb..71e87050d8 100644 --- a/Command/Init.hs +++ b/Command/Init.hs @@ -13,7 +13,7 @@ import System.Directory import Command import qualified Annex -import qualified GitRepo as Git +import qualified Git import qualified Branch import UUID import Version diff --git a/Command/Map.hs b/Command/Map.hs index 7a9121b69b..7bb435ff81 100644 --- a/Command/Map.hs +++ b/Command/Map.hs @@ -15,7 +15,7 @@ import Data.List.Utils import Command import qualified Annex -import qualified GitRepo as Git +import qualified Git import Messages import Types import Utility diff --git a/Command/Status.hs b/Command/Status.hs index 3b096d9793..53589030b3 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -18,7 +18,7 @@ import qualified Types.Backend as B import qualified Types.Remote as R import qualified Remote import qualified Command.Unused -import qualified GitRepo as Git +import qualified Git import Command import Types import DataUnits diff --git a/Command/Unannex.hs b/Command/Unannex.hs index 0de98b1d3f..fe413b25b4 100644 --- a/Command/Unannex.hs +++ b/Command/Unannex.hs @@ -19,8 +19,8 @@ import qualified Backend import LocationLog import Types import Content -import qualified GitRepo as Git -import qualified GitRepo.LsFiles as LsFiles +import qualified Git +import qualified Git.LsFiles as LsFiles import Messages command :: [Command] diff --git a/Command/Uninit.hs b/Command/Uninit.hs index 9698ed8200..c47ac0c3af 100644 --- a/Command/Uninit.hs +++ b/Command/Uninit.hs @@ -14,7 +14,7 @@ import Command import Messages import Types import Utility -import qualified GitRepo as Git +import qualified Git import qualified Annex import qualified Command.Unannex import qualified Command.Init diff --git a/Command/Unused.hs b/Command/Unused.hs index a9d5f90a10..3f51e2c2c2 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -22,8 +22,8 @@ import Locations import Utility import LocationLog import qualified Annex -import qualified GitRepo as Git -import qualified GitRepo.LsFiles as LsFiles +import qualified Git +import qualified Git.LsFiles as LsFiles import qualified Backend import qualified Remote diff --git a/Config.hs b/Config.hs index a324427d44..1016845e75 100644 --- a/Config.hs +++ b/Config.hs @@ -10,7 +10,7 @@ module Config where import Data.Maybe import Control.Monad.State (liftIO) -import qualified GitRepo as Git +import qualified Git import qualified Annex import Types import Utility diff --git a/Content.hs b/Content.hs index d733ad8b36..d24fc9ac70 100644 --- a/Content.hs +++ b/Content.hs @@ -36,7 +36,7 @@ import Types import Locations import LocationLog import UUID -import qualified GitRepo as Git +import qualified Git import qualified Annex import qualified AnnexQueue import qualified Branch diff --git a/GitRepo.hs b/Git.hs similarity index 99% rename from GitRepo.hs rename to Git.hs index cc4636868d..2b0cdd06d5 100644 --- a/GitRepo.hs +++ b/Git.hs @@ -3,12 +3,12 @@ - This is written to be completely independant of git-annex and should be - suitable for other uses. - - - Copyright 2010 Joey Hess + - Copyright 2010,2011 Joey Hess - - Licensed under the GNU GPL version 3 or higher. -} -module GitRepo ( +module Git ( Repo, repoFromCwd, repoFromAbsPath, diff --git a/GitRepo/LsFiles.hs b/Git/LsFiles.hs similarity index 98% rename from GitRepo/LsFiles.hs rename to Git/LsFiles.hs index 16604c319a..b88c9144e6 100644 --- a/GitRepo/LsFiles.hs +++ b/Git/LsFiles.hs @@ -5,7 +5,7 @@ - Licensed under the GNU GPL version 3 or higher. -} -module GitRepo.LsFiles ( +module Git.LsFiles ( inRepo, notInRepo, staged, @@ -15,7 +15,7 @@ module GitRepo.LsFiles ( typeChangedStaged, ) where -import GitRepo +import Git import Utility {- Scans for files that are checked into git at the specified locations. -} diff --git a/GitAnnex.hs b/GitAnnex.hs index 49ba63b8ab..58b512f718 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -9,7 +9,7 @@ module GitAnnex where import System.Console.GetOpt -import qualified GitRepo as Git +import qualified Git import CmdLine import Command import Options diff --git a/GitQueue.hs b/GitQueue.hs index be0fcfc4af..5da3ba1d6e 100644 --- a/GitQueue.hs +++ b/GitQueue.hs @@ -21,7 +21,7 @@ import Data.String.Utils import Control.Monad (unless, forM_) import Utility -import qualified GitRepo as Git +import qualified Git {- An action to perform in a git repository. The file to act on - is not included, and must be able to be appended after the params. -} diff --git a/GitUnionMerge.hs b/GitUnionMerge.hs index 74579ebcc9..84c7b44eae 100644 --- a/GitUnionMerge.hs +++ b/GitUnionMerge.hs @@ -18,7 +18,7 @@ import Data.List import Data.Maybe import Data.String.Utils -import qualified GitRepo as Git +import qualified Git import Utility {- Performs a union merge between two branches, staging it in the index. diff --git a/LocationLog.hs b/LocationLog.hs index 2a2bc63013..b7deb3ed9a 100644 --- a/LocationLog.hs +++ b/LocationLog.hs @@ -34,7 +34,7 @@ import Control.Monad (when) import Data.Maybe import Control.Monad.State (liftIO) -import qualified GitRepo as Git +import qualified Git import qualified Branch import UUID import Types diff --git a/Locations.hs b/Locations.hs index bfb0d3af9e..6142b2393a 100644 --- a/Locations.hs +++ b/Locations.hs @@ -36,7 +36,7 @@ import Data.Hash.MD5 import Types import Types.Key -import qualified GitRepo as Git +import qualified Git {- Conventions: - diff --git a/Remote/Bup.hs b/Remote/Bup.hs index c011c979ca..11c0ec4daf 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -21,7 +21,7 @@ import System.Cmd.Utils import Types import Types.Remote -import qualified GitRepo as Git +import qualified Git import qualified Annex import UUID import Locations diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 7b5917dca8..991ccbe481 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -18,7 +18,7 @@ import System.FilePath import Types import Types.Remote -import qualified GitRepo as Git +import qualified Git import qualified Annex import UUID import Locations diff --git a/Remote/Git.hs b/Remote/Git.hs index c8290c9a79..471417e345 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -15,7 +15,7 @@ import System.Posix.Files import Types import Types.Remote -import qualified GitRepo as Git +import qualified Git import qualified Annex import Locations import UUID diff --git a/Remote/Hook.hs b/Remote/Hook.hs index cc511965f8..86a7bca560 100644 --- a/Remote/Hook.hs +++ b/Remote/Hook.hs @@ -20,7 +20,7 @@ import System.Exit import Types import Types.Remote -import qualified GitRepo as Git +import qualified Git import qualified Annex import UUID import Locations diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs index bf1bbd8707..aa2507fff4 100644 --- a/Remote/Rsync.hs +++ b/Remote/Rsync.hs @@ -18,7 +18,7 @@ import System.Posix.Process import Types import Types.Remote -import qualified GitRepo as Git +import qualified Git import qualified Annex import UUID import Locations diff --git a/Remote/S3real.hs b/Remote/S3real.hs index 2479dfa023..829c58ad06 100644 --- a/Remote/S3real.hs +++ b/Remote/S3real.hs @@ -27,7 +27,7 @@ import System.Posix.Env (setEnv) import Types import Types.Remote import Types.Key -import qualified GitRepo as Git +import qualified Git import qualified Annex import UUID import Messages diff --git a/Remote/Special.hs b/Remote/Special.hs index 7d2ea1d704..9a00dbd82e 100644 --- a/Remote/Special.hs +++ b/Remote/Special.hs @@ -14,7 +14,7 @@ import Control.Monad.State (liftIO) import Types import Types.Remote -import qualified GitRepo as Git +import qualified Git import qualified Annex import UUID import Utility diff --git a/Ssh.hs b/Ssh.hs index 0cf2919c25..21e72c0839 100644 --- a/Ssh.hs +++ b/Ssh.hs @@ -9,7 +9,7 @@ module Ssh where import Control.Monad.State (liftIO) -import qualified GitRepo as Git +import qualified Git import Utility import Types import Config diff --git a/Types/Remote.hs b/Types/Remote.hs index 01ced04ae1..1d67ad5cd7 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -12,7 +12,7 @@ module Types.Remote where import Control.Exception import Data.Map as M -import qualified GitRepo as Git +import qualified Git import Types.Key type RemoteConfig = M.Map String String diff --git a/UUID.hs b/UUID.hs index 5d8304f83d..0723abeca4 100644 --- a/UUID.hs +++ b/UUID.hs @@ -29,7 +29,7 @@ import System.IO import qualified Data.Map as M import Data.Maybe -import qualified GitRepo as Git +import qualified Git import qualified Branch import Types import Types.UUID diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index cb6928fcee..39b8e47c5f 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -25,8 +25,8 @@ import Locations import LocationLog import qualified Annex import qualified AnnexQueue -import qualified GitRepo as Git -import qualified GitRepo.LsFiles as LsFiles +import qualified Git +import qualified Git.LsFiles as LsFiles import Backend import Messages import Version diff --git a/Upgrade/V2.hs b/Upgrade/V2.hs index ea68e78c95..ce0424b302 100644 --- a/Upgrade/V2.hs +++ b/Upgrade/V2.hs @@ -16,7 +16,7 @@ import Data.Maybe import Types.Key import Types import qualified Annex -import qualified GitRepo as Git +import qualified Git import qualified Branch import Messages import Utility diff --git a/Version.hs b/Version.hs index 690e693e23..7e7a4c7ce6 100644 --- a/Version.hs +++ b/Version.hs @@ -11,7 +11,7 @@ import Control.Monad (unless) import Types import qualified Annex -import qualified GitRepo as Git +import qualified Git import Config type Version = String diff --git a/git-annex-shell.hs b/git-annex-shell.hs index 55f34e1027..c240b1c190 100644 --- a/git-annex-shell.hs +++ b/git-annex-shell.hs @@ -8,7 +8,7 @@ import System.Environment import Data.List -import qualified GitRepo as Git +import qualified Git import CmdLine import Command import Utility diff --git a/git-annex.hs b/git-annex.hs index 9d6012f2c1..a53697cdbb 100644 --- a/git-annex.hs +++ b/git-annex.hs @@ -10,6 +10,4 @@ import System.Environment import GitAnnex main :: IO () -main = do - args <- getArgs - run args +main = run =<< getArgs diff --git a/git-union-merge.hs b/git-union-merge.hs index 57232be67b..4939fb57d1 100644 --- a/git-union-merge.hs +++ b/git-union-merge.hs @@ -11,7 +11,7 @@ import System.Directory import Control.Monad (when) import qualified GitUnionMerge -import qualified GitRepo as Git +import qualified Git header :: String header = "Usage: git-union-merge ref ref newref" diff --git a/test.hs b/test.hs index 9729818211..44a792f14c 100644 --- a/test.hs +++ b/test.hs @@ -27,7 +27,7 @@ import System.IO.HVFS (SystemFS(..)) import qualified Annex import qualified BackendList import qualified Backend -import qualified GitRepo as Git +import qualified Git import qualified Locations import qualified Utility import qualified Types.Backend