| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whether a derived copy of a flake or flake-input source needs to be
made again depends on the sources it draws inputs from. For one that
isn't in the store, the key had its hash, so every run read all of it,
e.g. all of a nixpkgs work tree, .git included, which takes long even
when nothing changed. For a Git work tree that Nix gets as git+file:,
whose commit and tracked files are all Nix uses, the key has its
commit instead, if no tracked file differs from it, which Git tells
quickly. git_flake decides what Nix gets as git+file:, for flake_url
as well.
Keys of copies drawing from such work trees change once, so those
copies get made again on the first run. The keys are the same as
krops 2's.
rewrite-cache-git checks that such a copy gets made again for a new
commit, but not for redeploying, nor for an untracked file.
|
| | |
|
| |
|
|
|
|
|
| |
git sources refused work trees with hooks, but populate's Git doesn't
run hooks, so git-foreign's work tree with a hook is fine to use, as it
expects. Only Nix's Git runs them, in a git+file: flake, so drawing
inputs refers to a work tree with hooks as path: instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The URLs of flakes went into nix flake lock's and nix flake metadata's
arguments as command substitutions, whose failure doesn't stop a script
under set -e. After "error: source p is not a directory", nix flake
lock ran with an empty URL, which Nix takes for the current directory:
on a remote target, the login directory, which ended up in the
world-readable store, .ssh included. URLs get assigned first now, so
failing to find one stops populate.
A phase's unexpected lists what populate is expected not to print,
whether it succeeds or not; notdir expects populate not to go on
locking.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Writing the lock file of a git+file: flake, Nix runs Git, with the
repository's configuration and hooks, which may run commands. A .git
in a source's directory can come from anywhere, e.g. one planted in a
materialized flake, or one a file source keeps. So drawing inputs
refers to a flake as git+file: only if git_problems finds nothing wrong
with its .git directory, the way git sources check their work trees,
and else as path:.
lock-foreign-git plants a .git in a materialized flake and in a file
source that keeps it, whose configuration names an fsmonitor command.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
git submodule update uses the .git of a submodule as it finds it in the
work tree: a repository of its own, with configuration that runs
commands, or a file naming a repository elsewhere. So git_problems
also requires each .git below the work tree to be a file naming a
repository in .git/modules. And it refuses hooks in .git/hooks, which
populate's Git doesn't run, but Nix's does, writing the lock file of a
flake in a git source. It's a shell function now, taking the work tree
at run time, so drawing inputs can use it too.
git-submodule plants a submodule's .git in the work tree: a repository
of its own whose configuration names a filter, and a file naming a
repository elsewhere. The fixture withsub has gitsrc as its submodule
sub.
|
| |
|
|
|
|
|
|
|
|
| |
A git source's url and ref are strings, and git clone, git remote, and
git fetch took ones starting with - for options, e.g. --upload-pack,
which runs a command where the repository is local. They come after
-- now, and so does a pass source's name for git log and pass show.
git-ref-option gives a ref that git fetch would take for
--upload-pack.
|
| |
|
|
|
|
|
|
|
| |
With allocateTTY, nixos-rebuild runs with a terminal, so it shows colours
and progress: on remote targets, ssh gets -t, which allocates a terminal
if its own input is one, and on the local target, expect's unbuffer
provides one.
The nixos-rebuild stand-in records whether its output is a terminal.
|
| |
|
|
|
|
|
|
| |
A ref that consists of 4 to 40 hex digits is a commit, which populate
fetches only if the work tree lacks it, unless fetchAlways is set. Any
other ref is a branch or tag, which populate fetches on every run,
resetting the work tree to the commit fetched. Resetting to the name
itself resolves to a local branch, which fetching doesn't move.
|
| |
|