d5d8259937
Attoparsec parser for diff-tree. Changed fromRef back to producing a String, to avoid needing to convert every use of it. However, this does mean I'm going to miss some opportunities where fromRef is used and the result converted back to a ByteString. Would be worth revisiting that at some point maybe.
25 lines
527 B
Haskell
25 lines
527 B
Haskell
{- git diff-tree item
|
|
-
|
|
- Copyright 2012 Joey Hess <id@joeyh.name>
|
|
-
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
|
-}
|
|
|
|
module Git.DiffTreeItem (
|
|
DiffTreeItem(..),
|
|
) where
|
|
|
|
import System.Posix.Types
|
|
import qualified Data.ByteString as S
|
|
|
|
import Git.FilePath
|
|
import Git.Types
|
|
|
|
data DiffTreeItem = DiffTreeItem
|
|
{ srcmode :: FileMode
|
|
, dstmode :: FileMode
|
|
, srcsha :: Sha -- null sha if file was added
|
|
, dstsha :: Sha -- null sha if file was deleted
|
|
, status :: S.ByteString
|
|
, file :: TopFilePath
|
|
} deriving Show
|