diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-02-05 15:47:11 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-02-05 15:47:11 +0100 |
commit | be2580be0172a29843ed64e01216da1c0ed9e935 (patch) | |
tree | f106714c82fba48720310539dd015c473a5e7c36 /src/libexpr | |
parent | 022287060b04ec0af229de1c2a440625d8f9d94d (diff) |
Warn when we commit a new revision
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/flake/flake.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 055ff6321..6b98cfad2 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -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 |