mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1158] Issue: .gitignore feature does not take index into account #649
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#649
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hakre on GitHub (May 11, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1158
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
act: shivammathur/node:latestactversion: act version 0.2.26Expected 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
@catthehacker commented on GitHub (May 11, 2022):
Duplicate of #912
@hakre commented on GitHub (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 commented on GitHub (May 11, 2022):
worktree: https://github.com/nektos/act/pull/829
core exclude: https://github.com/nektos/act/issues/1000
@hakre commented on GitHub (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/excludeand notcore.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 commented on GitHub (May 11, 2022):
make feature request and someone will look at it
@hakre commented on GitHub (Jun 20, 2022):
feature request created in #1160; open for feedback.