Closed japhb closed 12 years ago
hi - the idea is very neat. i'd be happy to merge it - with some changes.
however, i'm not so sure about [Git::GatherDir / SpecFiles] and the root / prefix attributes. they make sense with gatherdir, but not that much with git::gatherdir. indeed, git::gatherdir just gathers what git tracks. if one wants to add other directory, then back to simple (no-git) gatherdir.
same for ignore_dotfiles - either a file is tracked by git, or it isn't. and if it is, then it should be shipped...
finally, tests would be nice to have.
The root/prefix allow you to pull files from another repository -- and I could see someone wanting to still have the ability to only pull the tracked files from that other repository. I don't personally need it, but I didn't see that it was truly useless, so I left it in.
As for ignore_dotfiles, the functionality still completely makes sense to me -- .gitignore files are tracked, but it is perfectly reasonable not to ship them in the dzil-produced tarball. Mind you, you could certainly get the same effect with PruneCruft, but I figured RJBS had his reasons for including it in GatherDir, so I left it.
As for the tests -- well, it was getting late, and I figured it was more important to get the PoC to you than to put it off for whenever I got around to writing the tests. :-)
I believe this can be closed in light of https://github.com/jquelin/dist-zilla-plugin-git/pull/26
pullreq #26 merged, which includes this one.
Based on a suggestion from doy in #dzil, I've implemented a proof of concept Git::GatherDir plugin. It was created by copying the source for GatherDir, changing from File::Find::Rule to 'git ls-files' via Git::Wrapper, and fixing up the docs.
There are no tests yet, but it worked and did the Right Thing with one of my projects containing untracked files.
Would you mind pulling it upstream? (If there are copyright concerns, I'm happy to assign my changes to you and/or RJBS; the only concern might be the copied code from the original Dist::Zilla source.)
-'f