Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting rid of nix’s git staging requirements #314

Closed
jkarni opened this issue Oct 27, 2023 · 5 comments · Fixed by #406
Closed

Getting rid of nix’s git staging requirements #314

jkarni opened this issue Oct 27, 2023 · 5 comments · Fixed by #406
Labels

Comments

@jkarni
Copy link
Contributor

jkarni commented Oct 27, 2023

It’s incredibly annoying that unstaged files get ignored, and that we get warnings every time the tree is dirty. We should fix this somehow. I think only gitignored files should be ignored.

I think potentially we could upstream this to nix. Or we could fork nix.

@jkarni
Copy link
Contributor Author

jkarni commented Oct 27, 2023

As part of this, both the documentation and our flake.nix intent-to-add logic should be removed.

@jfroche
Copy link
Contributor

jfroche commented Oct 27, 2023

changing domenkozar/nix@bf9922e#diff-4de86ddf9ae3dd43a49cc14cc56e2f6b29f51fde7a0603e3ab7c5cd34599b5d7R395 to something which include:

git ls-files --cached -z --others --exclude-from=.gitignore seem to do the trick but only takes into account the root .gitignore

@jkarni jkarni changed the title Getting rid of nix’s staging requirements Getting rid of nix’s git staging requirements Oct 31, 2023
@alexdavid
Copy link
Contributor

There seems to be --exclude-standard which handles nested .gitignore files.

@jfroche
Copy link
Contributor

jfroche commented Nov 13, 2023

I have opened the PR into nix NixOS/nix#9352
Someone else opened a similar change and got this reply from the nix team: NixOS/nix#6858 (comment) but at least this new PR is opt-in
I will add it into garn tomorrow

@jfroche
Copy link
Contributor

jfroche commented Nov 14, 2023

Garn PR: #406

@jfroche jfroche linked a pull request Nov 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants