From 51c12a76ef54affaf9428232fde4f2c3e30e7488 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Feb 2014 01:09:17 -0400 Subject: remove Read instance for Ref Removed instance, got it all to build using fromRef. (With a few things that really need to show something using a ref for debugging stubbed out.) Then added back Read instance, and made Logs.View use it for serialization. This changes the view log format. --- Git/DiffTree.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Git/DiffTree.hs') diff --git a/Git/DiffTree.hs b/Git/DiffTree.hs index c82cf78cd..9e4fef9d6 100644 --- a/Git/DiffTree.hs +++ b/Git/DiffTree.hs @@ -36,12 +36,12 @@ data DiffTreeItem = DiffTreeItem {- Diffs two tree Refs. -} diffTree :: Ref -> Ref -> Repo -> IO ([DiffTreeItem], IO Bool) diffTree src dst = getdiff (Param "diff-tree") - [Param (show src), Param (show dst)] + [Param (fromRef src), Param (fromRef dst)] {- Diffs two tree Refs, recursing into sub-trees -} diffTreeRecursive :: Ref -> Ref -> Repo -> IO ([DiffTreeItem], IO Bool) diffTreeRecursive src dst = getdiff (Param "diff-tree") - [Param "-r", Param (show src), Param (show dst)] + [Param "-r", Param (fromRef src), Param (fromRef dst)] {- Diffs between a tree and the index. Does nothing if there is not yet a - commit in the repository. -} @@ -61,7 +61,7 @@ diffIndex' :: Ref -> [CommandParam] -> Repo -> IO ([DiffTreeItem], IO Bool) diffIndex' ref params repo = ifM (Git.Ref.headExists repo) ( getdiff (Param "diff-index") - ( params ++ [Param $ show ref] ) + ( params ++ [Param $ fromRef ref] ) repo , return ([], return True) ) -- cgit v1.2.3