1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 20:51:00 +01:00
This commit is contained in:
Wouter den Breejen 2007-08-14 17:34:45 +00:00
parent 4089bd5f19
commit 5a9cfdeb6e
11 changed files with 128 additions and 37 deletions

View file

@ -658,7 +658,10 @@ void Database::setStateRevisions(const Transaction & txn, TableId revisions_tabl
//save the date and comments
Strings metadata;
metadata.push_back(int2String(ts));
if(statePath == rootStatePath)
//get all paths that point to the same state (using shareing) and check if one of them equals the rootStatePath
PathSet sharedWith = getSharedWithPathSetRecTxn(txn, statePath);
if(statePath == rootStatePath || sharedWith.find(rootStatePath) != sharedWith.end())
metadata.push_back(comment);
else
metadata.push_back("Part of the snashot closure for " + rootStatePath);