This commit is contained in:
Dmitry Zuikov 2024-05-21 06:26:41 +03:00
parent 57a1a5e81b
commit 9ffe06a1dd
1 changed files with 18 additions and 3 deletions

View File

@ -522,8 +522,14 @@ list_ tpl a = do
liftIO $ hPutDoc stdout what
cat_ :: FixmePerks m => Text -> FixmeM m ()
cat_ hash = do
catFixmeMetadata :: FixmePerks m => Text -> FixmeM m ()
catFixmeMetadata = cat_ True
catFixme :: FixmePerks m => Text -> FixmeM m ()
catFixme = cat_ False
cat_ :: FixmePerks m => Bool -> Text -> FixmeM m ()
cat_ metaOnly hash = do
(before,after) <- asks fixmeEnvCatContext >>= readTVarIO
gd <- fixmeGetGitDirCLIOpt
@ -541,6 +547,11 @@ cat_ hash = do
Fixme{..} <- ContT $ maybe1 fme' (pure ())
when metaOnly do
for_ (HM.toList fixmeAttr) $ \(k,v) -> do
liftIO $ print $ (pretty k <+> pretty v)
exit ()
let gh' = HM.lookup "blob" fixmeAttr
-- FIXME: define-fallback-action
@ -768,8 +779,12 @@ run what = do
debug $ "list" <+> pretty n
list_ n whatever
ListVal [SymbolVal "cat", SymbolVal "metadata", FixmeHashLike hash] -> do
catFixmeMetadata hash
ListVal [SymbolVal "cat", FixmeHashLike hash] -> do
cat_ hash
catFixme hash
ListVal [SymbolVal "delete", FixmeHashLike hash] -> do
delete hash