add new status command
This works for both direct and indirect mode. It may need some performance tuning. Note that unlike git status, it only shows the status of the work tree, not the status of the index. So only one status letter, not two .. and since files that have been added and not yet committed do not differ between the work tree and the index, they are not shown. Might want to add display of the index vs the last commit eventually. This commit was sponsored by an unknown bitcoin contributor, whose contribution as been going up lately! ;)
This commit is contained in:
parent
eed2ed4fdb
commit
59ecc804cd
6 changed files with 125 additions and 9 deletions
|
@ -11,6 +11,7 @@ module Git.LsFiles (
|
|||
allFiles,
|
||||
deleted,
|
||||
modified,
|
||||
modifiedOthers,
|
||||
staged,
|
||||
stagedNotDeleted,
|
||||
stagedOthersDetails,
|
||||
|
@ -65,6 +66,12 @@ modified l repo = pipeNullSplit params repo
|
|||
where
|
||||
params = [Params "ls-files --modified -z --"] ++ map File l
|
||||
|
||||
{- Files that have been modified or are not checked into git. -}
|
||||
modifiedOthers :: [FilePath] -> Repo -> IO ([FilePath], IO Bool)
|
||||
modifiedOthers l repo = pipeNullSplit params repo
|
||||
where
|
||||
params = [Params "ls-files --modified --others -z --"] ++ map File l
|
||||
|
||||
{- Returns a list of all files that are staged for commit. -}
|
||||
staged :: [FilePath] -> Repo -> IO ([FilePath], IO Bool)
|
||||
staged = staged' []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue