Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- class VCS a where
- branchCmd :: a -> String
- branchArgs :: a -> [String]
- statusCmd :: a -> String
- statusArgs :: a -> [String]
- repoName :: a -> String
- getAhead :: a -> String -> Maybe String
- getBehind :: a -> String -> Maybe String
- getCleanliness :: a -> String -> Maybe String
- getStatus :: a -> IO (Maybe String, Maybe String, Maybe String)
- getBranch :: a -> IO (Maybe String)
- isRepo :: a -> IO Bool
- installed :: a -> IO Bool
Version Control System
Every version control system provides functions as follows
branchCmd :: a -> String Source
get command for revealing branch
branchArgs :: a -> [String] Source
get arguments for revealing branch
statusCmd :: a -> String Source
get command for revealing status
statusArgs :: a -> [String] Source
get arguments for revealing status
repoName :: a -> String Source
get name of repository folder
getAhead :: a -> String -> Maybe String Source
tracking ahead
getBehind :: a -> String -> Maybe String Source
tracking behind
getCleanliness :: a -> String -> Maybe String Source
determining the cleanliness of working-tree
* ' ' - clean
* ?
- clean (exists untracked file)
* '#' - dirty (non-empty index; ready for commit..)
* *
- dirty (empty index)
:: a | |
-> IO (Maybe String, Maybe String, Maybe String) | (cleanliness, ahead, behind) | get current name of git-branch |
get current status
:: a | |
-> IO (Maybe String) | current branch name | using status to verifying the existence of repository |
installed :: a -> IO Bool Source
is this vcs installed (= executable)