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

Integrate new .gitignore system #3

Open
brynblack opened this issue Feb 14, 2024 · 2 comments · May be fixed by #4
Open

Integrate new .gitignore system #3

brynblack opened this issue Feb 14, 2024 · 2 comments · May be fixed by #4
Assignees
Labels
development Standard development

Comments

@brynblack
Copy link
Member

Specification

There exists a more advanced .gitignore system called hercules-ci. Our current nix-gitignore.gitignoreSource still keeps .git in the produced output.

nix-gitignore.gitignoreSource [] ./.

Still has .git.

But you need to do:

nix-gitignore.gitignoreSource [".git"] ./.

Actually ignores it.

Now I didn't see this before, not sure if this is a regression.

However the hercules-ci gitignore is apparently the more advanced one.

Basically get this done: hercules-ci/gitignore.nix#6

Tasks

  1. ...
  2. ...
  3. ...
@brynblack brynblack added the development Standard development label Feb 14, 2024
@brynblack brynblack self-assigned this Feb 14, 2024
Copy link

According to NixOS Wiki, for flakes in git repos, only files in the working tree will be copied to the store. Given that we are migrating our repos from using shell.nix to use flake.nix, this issue might be redundant.

@CMCDragonkai
Copy link
Member

No, we still need to ignore more files then what is left in the working tree.

So it may be that we don't have to ignore .git, but we still have to ignore all other files. For example:

  src = nix-gitignore.gitignoreSource [
    # The `.git` itself should be ignored
    ".git"
    # Non-build files
    "/nodemon.json"
    # Hidden files
    "/.*"
    # Nix files
    "/*.nix"
    # Benchmarks
    "/benches"
    # Docs
    "/docs"
    # Tests
    "/tests"
    "/jest.config.js"
  ] ./.;

So this issue isn't redundant.

@aryanjassal aryanjassal linked a pull request Jun 19, 2024 that will close this issue
9 tasks
@aryanjassal aryanjassal assigned aryanjassal and unassigned brynblack Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development
Development

Successfully merging a pull request may close this issue.

3 participants