cli-git-0.2.0.0: Bindings to the git command-line interface
Safe HaskellNone
LanguageHaskell2010

Bindings.Cli.Git

Synopsis

Documentation

gitProc :: FilePath -> [String] -> ProcessSpec Source #

Create a ProcessSpec for invoking git in a specified repository path, using the given arguments.

ensureCleanGitRepo Source #

Arguments

:: (MonadIO m, MonadLog Output m, MonadError e m, AsProcessFailure e, MonadFail m, AsUnstructuredError e, HasCliConfig e m, MonadMask m) 
=> FilePath

The repository

-> Bool

Should ignored files be considered?

-> Text

The error message which should be thrown when the repository is unclean.

-> m () 

Ensure that the given directory is a clean git repository. If the repository has changes, throw an error.

readGitProcess :: (MonadIO m, MonadLog Output m, MonadError e m, AsProcessFailure e, MonadFail m, MonadMask m) => FilePath -> [String] -> m Text Source #

Call git in the specified directory with the given arguments and return its standard output stream. Error messages from git, if any, are printed with Notice verbosity.

isolateGitProc :: ProcessSpec -> ProcessSpec Source #

Modify the ProcessSpec to apply environment flags which ensure git has no dependency on external information. Specifically:

  • The HOME directory is unset
  • GIT_CONFIG_NOSYSTEM is set to 1
  • GIT_TERMINAL_PROMPT is set to 0 and GIT_ASKPASS is set to echo, so that password prompts will not pop up
  • The SSH command used is ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no -o GSSAPIAuthentication=no

gitProcNoRepo :: [String] -> ProcessSpec Source #

Create a ProcessSpec for invoking git without a specified repository, using the given arguments.

data GitRef Source #

Instances

Instances details
Eq GitRef Source # 
Instance details

Defined in Bindings.Cli.Git

Methods

(==) :: GitRef -> GitRef -> Bool #

(/=) :: GitRef -> GitRef -> Bool #

Ord GitRef Source # 
Instance details

Defined in Bindings.Cli.Git

Show GitRef Source # 
Instance details

Defined in Bindings.Cli.Git