diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-02 14:18:21 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-02 14:18:21 -0400 |
commit | eec137f33a2b6982403d7dd9187500ad5a14b868 (patch) | |
tree | 9f5cf1dbf5e7be913d1f42f26d7f77943cdd2704 /Logs/UUID.hs | |
parent | 8e249ea0bdbf0b0890d6e3d3ed1e30c1df36e136 (diff) |
Record uuid when auto-initializing a remote so it shows in status.
Diffstat (limited to 'Logs/UUID.hs')
-rw-r--r-- | Logs/UUID.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Logs/UUID.hs b/Logs/UUID.hs index c05c4e348..77cfb5ce0 100644 --- a/Logs/UUID.hs +++ b/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 |