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

File being ignored even though it's committed #66

Open
someplaceguy opened this issue Dec 28, 2023 · 2 comments
Open

File being ignored even though it's committed #66

someplaceguy opened this issue Dec 28, 2023 · 2 comments

Comments

@someplaceguy
Copy link

someplaceguy commented Dec 28, 2023

If you have a git repository that contains a file that is committed but matches a .gitignore rule, it will be checked out by git but not by gitignore.nix.

Example repository:

git init test
cd test
mkdir dir
touch dir/file
git add dir/file
git commit -m test
echo 'dir/*' > .gitignore
git add .gitignore
git commit -m test2

If you clone this repository with git, dir/file will be checked out inside the cloned repo.

However, if you use gitignore.nix, it will filter dir/file, thus resulting in what appears to be an empty repository...

@someplaceguy
Copy link
Author

someplaceguy commented Dec 28, 2023

Ah, I see this might already be mentioned as missing functionality in the README file, specifically in the table with the row "Includes added but ignored files" (although I think "added" is not exactly the same as "committed" AFAIU).

Anyway, feel free to close this issue if you'd like.

@roberth
Copy link
Member

roberth commented Dec 29, 2023

It's a valid issue, and I think it should be resolved when Nix provides a sufficiently lazy fetching functionality, such as an alternative to. Not really blocked on the literal issue, but I'll link it as

More specifically it needs a non-experimental and lazy fetchTree for type = "git"; (mentioned in aforementioned issue).
Related milestone:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants