---
name: "Dist::Zilla::Role::Git::DirtyFiles"
section: "3pm"
platform: "linux"
package: "libdist-zilla-plugin-git-perl"
version: "2.051-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Dist::Zilla::Role::Git::DirtyFiles"
---

# Dist::Zilla::Role::Git::DirtyFiles(3pm)

Provide the allow\_dirty & changelog attributes

## NAME

Dist::Zilla::Role::Git::DirtyFiles - Provide the allow\_dirty & changelog attributes

## VERSION

version 2.051

## DESCRIPTION

This role is used within the git plugin to work with files that are dirty in the local git checkout.

## ATTRIBUTES

### allow\_dirty

A list of paths that are allowed to be dirty in the git checkout. Defaults to `"dist.ini"` and the changelog (as defined per the `"changelog"` attribute.

If your `"repo_root"` is not the default (`"."`), then these pathnames are relative to Dist::Zilla's root directory, not the Git root directory.

### allow\_dirty\_match

A list of regular expressions that match paths allowed to be dirty in the git checkout.  This is combined with `"allow_dirty"`.  Defaults to the empty list.

The paths being matched are relative to the Git root directory, even if your `"repo_root"` is not the default (`"."`).

### changelog

The name of the changelog. Defaults to `"Changes"`.

## METHODS

### list\_dirty\_files

```
  my @dirty = $plugin->list_dirty_files($git, $listAllowed);
```

This returns a list of the modified or deleted files in `$git`, filtered against the `"allow_dirty"` attribute.  If `$listAllowed` is true, only allowed files are listed.  If it's false, only files that are not allowed to be dirty are listed.

In scalar context, returns the number of dirty files.

## SUPPORT

Bugs may be submitted through the RT bug tracker \<https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-Git\> (or bug-Dist-Zilla-Plugin-Git@rt.cpan.org \<mailto:bug-Dist-Zilla-Plugin-Git@rt.cpan.org\>).

There is also a mailing list available for users of this distribution, at \<http://dzil.org/#mailing-list\>.

There is also an irc channel available for users of this distribution, at `"#distzilla"` on `"irc.perl.org"` \<irc://irc.perl.org/#distzilla\>.

## AUTHOR

Jerome Quelin

## COPYRIGHT AND LICENCE

This software is copyright (c) 2009 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
