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

Issue: .gitignore feature does not take index into account #1158

Closed
hakre opened this issue May 11, 2022 · 6 comments
Closed

Issue: .gitignore feature does not take index into account #1158

hakre opened this issue May 11, 2022 · 6 comments
Labels
kind/bug Something isn't working

Comments

@hakre
Copy link

hakre commented May 11, 2022

this is a feature request to improve the handling of the patterns within .gitignore file by taking the tracked files into account that are effectively not ignored any longer even if a git-ignore pattern matches their path.

this would allow to not copy ignored files into the container while copying those that are tracked paths of the git repository.

System information

  • Operating System: Linux
  • Architecture: x64 (64-bit)
  • Apple M1: no
  • Docker version: 20.10.5
  • Docker image used in act: shivammathur/node:latest
  • act version: act version 0.2.26

Expected behaviour

if the feature is enabled (default) that the .gitignore prevents copying files into the container, then I'd expect that files that are not ignored by git to be copied into the container as well.

Actual behaviour

files not ignored by git (by the index - not by pattern in the .gitignore) are not copied into the container if there is a line in a .gitignore file that matches the non-ignored file.

Extra

@hakre hakre added the kind/bug Something isn't working label May 11, 2022
@catthehacker
Copy link
Member

Duplicate of #912

@catthehacker catthehacker marked this as a duplicate of #912 May 11, 2022
@hakre
Copy link
Author

hakre commented May 11, 2022

@catthehacker ups, didn't find it. if I may expand on this, repository excludes (optionally worktree / git-worktree(1)) and local / user .gitignore (core excludes file) - this just popped in my mind after creating the issue. but then it perhaps also already exists.

@catthehacker
Copy link
Member

worktree: #829
core exclude: #1000

@hakre
Copy link
Author

hakre commented May 11, 2022

double checked, looks like core.excludesfile setting is missing at least on my test user-wide excluded files from the development setup went into the container. if I read #1000 correctly it is about .git/info/exclude and not core.excludesfile.

regression? or just new? worth filing? (from my perspective yes, but if the go dependency does not support it this is perhaps something for upstream, it does not have the kind of problems worktree has thought)

@catthehacker
Copy link
Member

make feature request and someone will look at it

@hakre
Copy link
Author

hakre commented Jun 20, 2022

feature request created in #1160; open for feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants