Record uuid when auto-initializing a remote so it shows in status.
This commit is contained in:
parent
8e249ea0bd
commit
eec137f33a
4 changed files with 14 additions and 1 deletions
10
Logs/UUID.hs
10
Logs/UUID.hs
|
@ -15,6 +15,7 @@
|
|||
|
||||
module Logs.UUID (
|
||||
describeUUID,
|
||||
recordUUID,
|
||||
uuidMap
|
||||
) where
|
||||
|
||||
|
@ -37,6 +38,15 @@ describeUUID uuid desc = do
|
|||
Annex.Branch.change logfile $
|
||||
showLog id . changeLog ts uuid desc . parseLog Just
|
||||
|
||||
{- Records the uuid in the log, if it's not already there. -}
|
||||
recordUUID :: UUID -> Annex ()
|
||||
recordUUID u = go . M.lookup u =<< uuidMap
|
||||
where
|
||||
go (Just "") = set
|
||||
go Nothing = set
|
||||
go _ = return ()
|
||||
set = describeUUID u ""
|
||||
|
||||
{- Read the uuidLog into a simple Map.
|
||||
-
|
||||
- The UUID of the current repository is included explicitly, since
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue