mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 14:56:15 +02:00
Set locked flag
This commit is contained in:
parent
04d5417755
commit
f917970df8
3 changed files with 4 additions and 8 deletions
|
@ -682,14 +682,6 @@ LockedFlake lockFlake(
|
|||
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
|
||||
dirty to a clean tree! */
|
||||
if (flake->lockedRef.input == prevLockedRef.input
|
||||
&& !flake->lockedRef.input.isLocked())
|
||||
throw Error("'%s' did not change after I updated its 'flake.lock' file; is 'flake.lock' under version control?", flake->originalRef);
|
||||
}
|
||||
} else
|
||||
throw Error("cannot write modified lock file of flake '%s' (use '--no-write-lock-file' to ignore)", topRef);
|
||||
|
|
|
@ -741,6 +741,8 @@ struct GitInputScheme : InputScheme
|
|||
input.attrs.insert_or_assign(
|
||||
"revCount",
|
||||
getRevCount(repoInfo, repoInfo.url, *input.getRev()));
|
||||
|
||||
input.locked = true;
|
||||
}
|
||||
|
||||
// FIXME: maybe we should use the timestamp of the last
|
||||
|
|
|
@ -192,6 +192,8 @@ struct GitArchiveInputScheme : InputScheme
|
|||
auto rev = input.getRev();
|
||||
if (!rev) rev = getRevFromRef(store, input);
|
||||
|
||||
input.locked = true;
|
||||
|
||||
input.attrs.erase("ref");
|
||||
input.attrs.insert_or_assign("rev", rev->gitRev());
|
||||
|
||||
|
|
Loading…
Reference in a new issue