Allows ignoring file metadata differences (permissions, ownership)
when comparing files.
This is especially useful on darwin, where we often run into subtle
issues like:
-Device: 1,23 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ wheel)
+Device: 1,23 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 350/ nixbld)
The approach used to expand the documentation for `fetchFromBitbucket`
purposefully mimics the documentation for `fetchFromGitHub` with the
goal of making sure the reader is aware of all of the fetcher's
capabilities without having to read the source code.
Add an optional postFailureMessage parameter to testEqualContents that allows
users to provide additional context when tests fail. This is particularly useful
for providing instructions on how to update expected results when they change
intentionally.
The message is displayed after the standard failure output, helping maintainers
understand what to do next when a test fails.
With this argument fetchgit will make a subdirectory of the Git
repository a root of the resulting store path. This is helpful for
dealing with monorepos where many projects are in separate directories
and don't need a new source hash every time the monorepo is updated.
Commit hash is removed from the name of the derivation to prevent it
from changing the store path when nothing in the subdirectory changes.
Added fetchTags feature to fetchgit, explicit and clear support for
fetching all tags after the source tree fetch completes. Doing this at
build-time in the fetcher is required for packages that invoke commands
like 'git describe' which require tags, and since the nix store is
read-only by design, it is not possible to git fetch --tags at
activation- or run-time. This feature may have been possible by
specifying a postFetch option including calling git fetch --tags,
however doing so obfuscates the solution to this very real problem.
Explicit support for fetching tags should be a first class citizen just
like fetching other refs.
This allows running code to change the environment before the
nix-prefetch-git script is run. In particular, it allows setting things
like NIX_PREFETCH_GIT_CHECKOUT_HOOK, which allows additional code to be
run before deleting the .git directory.
This also means there's potentially value in performing a deep clone
then removing the .git directory, so remove the assertion that prevents
doing so.