Skip to content

Respect gitignore (optional, off by default) #2770

Closed

Description

@guettli

Description

I would like to execute something, when a file which is tracked in git has changed:

foo:
  sources:
    - '**/*'
    - use-gitignore: true

This does not exist yet:

  • use-gitignore: true

Would you accept a PR which implements this?

If "no", would you accept a PR which implements something similar?

Related:

BTW, I found a work-around which I explain here: skip this task unless files in this path changed since the last successful run

Activity

  1. andreynering commented on Apr 1, 2026

    @andreynering
    Member

    Hi @guettli,

    Respecting .gitignore probably makes sense, and there is a package we can use for that.

    I just don't think use-gitignore fits well inside sources:. Maybe we can add that as a global option.

  2. added
    area: fingerprintingChanges related to checksums and caching.
    and removed
    state: needs triageWaiting to be triaged by a maintainer.
    on Apr 1, 2026
  3. guettli commented on Apr 1, 2026

    @guettli
    Author

    Hi @guettli,

    Respecting .gitignore probably makes sense, and there is a package we can use for that.

    I just don't think use-gitignore fits well inside sources:. Maybe we can add that as a global option.

    I am fine with a global options. But maybe there are edge-cases where a "per task" config is better...

  4. trulede commented on Apr 19, 2026

    @trulede
    Contributor

    @guettli please see PR #2773, perhaps offer comments or add a review.

  5. guettli commented on Apr 19, 2026

    @guettli
    Author

    @trulede thank you for the hint. I had a look. Looks good.

  6. hookenz commented on Jun 17, 2026

    @hookenz

    Is there a reason why use-gitignore: true should not be the default?

  7. trulede commented on Jun 17, 2026

    @trulede
    Contributor

    Is there a reason why use-gitignore: true should not be the default?

    You want transient files to be part of your sources, which would be the normal/general case.
    The use-gitignore option has the potential to be very confusing in operation.

    And then there is the "watcher" ...

  8. vmaerten commented on Jul 19, 2026

    @vmaerten
    Member

    Done in #2773 :)
    (And released)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: fingerprintingChanges related to checksums and caching.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions