Warn when we commit a new revision

This commit is contained in:
Eelco Dolstra 2020-02-05 15:47:11 +01:00
parent 022287060b
commit be2580be01

View file

@ -599,6 +599,11 @@ LockedFlake lockFlake(
FlakeCache dummyCache;
flake = getFlake(state, topRef, {}, lockFlags.useRegistries, dummyCache);
if (lockFlags.commitLockFile &&
flake.lockedRef.input->getRev() &&
prevLockedRef.input->getRev() != flake.lockedRef.input->getRev())
warn("committed new revision '%s'", flake.lockedRef.input->getRev()->gitRev());
/* Make sure that we picked up the change,
i.e. the tree should usually be dirty
now. Corner case: we could have reverted from a