wip, some man entries

This commit is contained in:
voidlizard 2025-01-20 09:51:10 +03:00
parent 8bb17eaafb
commit ba873cd46a
1 changed files with 15 additions and 19 deletions

View File

@ -287,18 +287,6 @@ compression ; prints compression level
for_ trees $ \tree -> do for_ trees $ \tree -> do
writeAsGitPack dir tree writeAsGitPack dir tree
entry $ bindMatch "reflog:index:list:fast" $ nil_ $ const $ lift $ connectedDo do
files <- listObjectIndexFiles
forConcurrently_ files $ \(f,_) -> do
bs <- liftIO $ mmapFileByteString f Nothing
for_ (toSectionList bs) $ \segment -> do
let (sha1,blake) = BS.splitAt 20 segment
& over _1 (coerce @_ @GitHash)
& over _2 (coerce @_ @HashRef)
notice $ pretty sha1 <+> pretty blake
entry $ bindMatch "reflog:index:list:count" $ nil_ $ const $ lift $ connectedDo do entry $ bindMatch "reflog:index:list:count" $ nil_ $ const $ lift $ connectedDo do
idx <- openIndex idx <- openIndex
num_ <- newIORef 0 num_ <- newIORef 0
@ -498,14 +486,22 @@ compression ; prints compression level
(p,_) <- getRepoRefLogCredentials (p,_) <- getRepoRefLogCredentials
liftIO $ print $ pretty $ mkForm @C "matched" [mkSym (show $ pretty ( AsBase58 p) )] liftIO $ print $ pretty $ mkForm @C "matched" [mkSym (show $ pretty ( AsBase58 p) )]
entry $ bindMatch "repo:key:show" $ nil_ $ const $ lift do brief "set default repository key"
r <- getGitRepoKey >>= orThrow GitRepoRefNotSet $ desc "needed when you call hbs2-git command directly"
liftIO $ print $ pretty (AsBase58 r) $ examples [qc|
; in config:
repo:key EvP3kskPVuKuKVMUc3LnfdW7GcFYjz6f5fFU1EGzrdgk
repo:key ; shows current repo key
|] $
entry $ bindMatch "repo:key" $ nil_ $ \case entry $ bindMatch "repo:key" $ nil_ $ \case
[ SignPubKeyLike k ] -> lift do [ SignPubKeyLike k ] -> lift do
setGitRepoKey k setGitRepoKey k
[] -> lift do
r <- getGitRepoKey >>= orThrow GitRepoRefNotSet
liftIO $ print $ pretty (AsBase58 r)
_ -> throwIO (BadFormException @C nil) _ -> throwIO (BadFormException @C nil)
entry $ bindMatch "repo:ref:value"$ nil_ $ const $ lift $ connectedDo do entry $ bindMatch "repo:ref:value"$ nil_ $ const $ lift $ connectedDo do