Change the way cache:paths and cache:untracked work together
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=27804) </details> <!--IssueSummary end--> ### Problem to solve Currently, `cache` attribute of the job is processed in the same way as `artifacts`. All the files matching the `cache:paths` are taken with addition of `git ls-files -o` if `cache:untracked` is specified. However placing version-controlled files in the cache makes little to no sense and can easily lead to hardly discoverable bugs. ### Further details The behavior was taken from `artifacts` attribute where it was reasonable. ### Proposal Fix processing of `cache` attribute so that specifying both `cache:paths` and `cache:untracked` means "take files from `git ls-files -o` and filter them against `cache:paths`" ### Documentation Currently this point is not covered in documentation. gitlab-ce~10230929 gitlab-ce~4107606
issue