diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-16 16:36:35 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-16 16:36:35 -0400 |
commit | db6b4cdfcf67cfc3fce5e5f4323aa96a6ebd3e59 (patch) | |
tree | a65a129d7289b400e1b558e7b6d3c19eefd54f76 /Seek.hs | |
parent | aeaaa0ff87e22c3a5b4c9657544224c9db006cde (diff) |
rekey: New plumbing level command, can be used to change the keys used for files en masse.
Diffstat (limited to 'Seek.hs')
-rw-r--r-- | Seek.hs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -45,6 +45,13 @@ withWords a params = return [a params] withStrings :: (String -> CommandStart) -> CommandSeek withStrings a params = return $ map a params +withPairs :: ((String, String) -> CommandStart) -> CommandSeek +withPairs a params = return $ map a $ pairs [] params + where + pairs c [] = reverse c + pairs c (x:y:xs) = pairs ((x,y):c) xs + pairs _ _ = error "expected pairs" + withFilesToBeCommitted :: (String -> CommandStart) -> CommandSeek withFilesToBeCommitted a params = prepFiltered a $ seekHelper LsFiles.stagedNotDeleted params |