I am using flakes to power my continuous integration and bulletproof developer environments.
These projects are Git repositories and I run nix develop or nix shell in them.
I consistently see a message of “warning: Git tree ‘/some/path’ is dirty”.
From what I remember, git status shows a clean working directory.
As a nix flakes user, do you see this consistently?
Do you know why this message occurs? I’m confused since git status tells me otherwise.
I consistently see a message of “warning: Git tree ‘/some/path’ is dirty”.
From what I remember, git status shows a clean working directory.
As a nix flakes user, do you see this consistently?
I only see this message when the git tree is in fact dirty. Looks like a
bug to me. Would you mind putting together a reproducible example and an
issue on the github:nixos/nix repository?
self.rev not working in GitLab CI is why I was looking into this issue.
For now I do something like this in my .gitlab-ci.yml script:
# build nix from that PR with my workaround applied
- nix build --out-link nix "github:mschwaig/nix?rev=bc66c8316648a30b1e08e93d01a09f52333adcf4
# use that nix to run whatever command
- ./nix/bin/nix build
If you want you can check if this fixes your issue as well - as long as your locale in git is English.