summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-09 14:52:43 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-09 14:52:43 -0400
commit6e75bebb7e5f5fa2702e0142198063be4b6444dc (patch)
tree0cd2945ca5eed01d4aa4a9b12cad332a730ae5b7
parenta02316b05920ed87bb855c2647738ac0557ae81e (diff)
improve api, removing IO
-rw-r--r--doc/design/adjusted_branches.mdwn16
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/design/adjusted_branches.mdwn b/doc/design/adjusted_branches.mdwn
index 351083d59..299ff62cf 100644
--- a/doc/design/adjusted_branches.mdwn
+++ b/doc/design/adjusted_branches.mdwn
@@ -187,14 +187,22 @@ like this, at its most simple:
data FilterAction = UnchangedFile | UnlockFile | HideFile | RenameFile FilePath FilePath
- applyFilter :: Filter -> FilePath -> Annex FilterAction
+ data FileInfo = FileInfo
+ { originalBranchFile :: FileStatus
+ , worktreeFile :: Maybe FileStatus
+ , isContentPresent :: Bool
+ }
- -- Look at current state of file and get the FilterAction that
+ data FileStatus = IsAnnexSymlink | IsAnnexPointer
+
+ applyFilter :: Filter -> FilePath -> FileInfo -> FilterAction
+
+ -- Look at the current state of file and get the FilterAction that
-- would have led to this state.
- reverseFilter :: Filter -> FilePath -> Annex FilterAction
+ reverseFilter :: Filter -> FilePath -> FileInfo -> FilterAction
applyFilterAction :: FilePath -> FilterAction -> Annex Bool
-- Generate a version of the original commit with the filtering of
-- modified files reversed.
- reverseFilterActions :: [(FilePath, FilterAction)] -> Git.Commit -> Annex Git.Commit
+ reverseFilterActions :: [(FilePath, FilterAction)] -> Git.Commit -> Git.Commit