summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-09 14:59:13 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-09 14:59:13 -0400
commita2c1b753d61a91f25457762fd1ca93f08cf1898d (patch)
treee73d19f62025f031221ba765448165fc0b0aeaec /doc
parent6e75bebb7e5f5fa2702e0142198063be4b6444dc (diff)
improve
Diffstat (limited to 'doc')
-rw-r--r--doc/design/adjusted_branches.mdwn25
1 files changed, 19 insertions, 6 deletions
diff --git a/doc/design/adjusted_branches.mdwn b/doc/design/adjusted_branches.mdwn
index 299ff62cf..4cbed8701 100644
--- a/doc/design/adjusted_branches.mdwn
+++ b/doc/design/adjusted_branches.mdwn
@@ -185,7 +185,11 @@ like this, at its most simple:
setFilter :: Filter -> Annex ()
- data FilterAction = UnchangedFile | UnlockFile | HideFile | RenameFile FilePath FilePath
+ data FilterAction
+ = UnchangedFile FilePath
+ | UnlockFile FilePath
+ | HideFile FilePath
+ | RenameFile FilePath FilePath
data FileInfo = FileInfo
{ originalBranchFile :: FileStatus
@@ -194,15 +198,24 @@ like this, at its most simple:
}
data FileStatus = IsAnnexSymlink | IsAnnexPointer
+ deriving (Eq)
applyFilter :: Filter -> FilePath -> FileInfo -> FilterAction
+ applyFilter UnlockFilter f fi
+ | worktreeFile fi == Just IsAnnexSymlink = UnlockFile f
+ applyFilter HideMissingFilter f fi
+ | not (isContentPresent fi) = HideFile f
+ applyFilter UnlockHideMissingFilter f fi
+ | not (isContentPresent fi) = HideFile f
+ | otherwise = applyFilter UnlockFilter f fi
+ applyFilter _ f _ = UnchangedFile f
+
+ applyFilterAction :: FilePath -> FilterAction -> Annex Bool
-- Look at the current state of file and get the FilterAction that
-- would have led to this state.
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 -> Git.Commit
+ -- Generate a version of the commit made on the filter branch
+ -- with the filtering of modified files reversed.
+ unfilteredCommit :: Filter -> Git.Commit -> Git.Commit