Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Git CPAN distribution.

Report information
The Basics
Id: 67808
Status: open
Priority: 0/
Queue: Dist-Zilla-Plugin-Git

People
Owner: Nobody in particular
Requestors: APOCAL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Smarter detection of missing files in .gitignore?
Hello, I just saw this on IRC and thought it would be an useful feature. Git::Check should check to see if "common" stuff is missing in .gitignore, and inform the user in a helpful way. 2 things I can think of is the .build dir ( but that generally is ignored? ) and the dist build dir. Mattp++ reported this on IRC and the fix was to add it to .gitignore but maybe it can be easier? i.e. detect if a untracked dir actually is the build dir by matching the dist name + version + other regex-fu? If you think this is a good idea I'll be more than happy to try and get the code working + send a pull request :) <mattp> im trying to release a module based off of dagolden's bundle <mattp> http://search.cpan.org/~dagolden/Dist-Zilla-PluginBundle-DAGOLDEN-0.017/lib/Dist/Zilla/PluginBundle/DAGOLDEN.pm <dipsy> urgh. long url. Try http://tinyurl.com/6ckpep4 <dipsy> [ Dist::Zilla::PluginBundle::DAGOLDEN - search.cpan.org ] <mattp> when i dzil release however, it seems to be failing at [Git::Check] because of untracked files <mattp> excepted the untracked/uncommited files are the files from the release that have been generated by the build <mattp> http://paste.scsys.co.uk/100017 <dipsy> [ magnet_web paste from Someone at 217.168.150.38... ] <Apocalypse> mattp: hmm did you git add them? <Apocalypse> To me that seems like a case of not git adding+committing them before trying to dzil release <Apocalypse> look at Git::Check - the allow_dirty attr, generally you are allowed to have uncommitted "Changes" file - everything else must be "up-to-date" <mattp> i wouldnt want the dzil build output committed into the repo. i assumed i was doing something wrong <mattp> i just disabled it :) <Apocalypse> the dzil build output shouldn't be committed <Apocalypse> ahh i think i got it <mike> You can have dzil release automatically commit the files that change during release to the repo <Apocalypse> you need to add the generated dir to .gitignore <Apocalypse> typically a dzilified dist should have only 2 lines in .gitignore <Apocalypse> 1. the build dir <Apocalypse> 2. the dist dir <Apocalypse> mattp: for an example - https://github.com/apocalypse/perl-test-apocalypse/blob/master/.gitignore <dipsy> [ .gitignore at master from apocalypse/perl-test-apocalypse - GitHub ] <Apocalypse> Git::Check could be smarter and try to detect if this happened and give a better error message :) <mattp> Apocalypse: thanks <Apocalypse> mattp: I'm filing a RT ticket so we don't forget to make that easier, thanks for the report! :) <mattp> im glad my ignorance was put to good use His nopaste is here: [~/projects/cpan-selenium-rc-perl (master)] $ dzil release [DZ] beginning to build Test-WWW-Selenium [DZ] guessing dist's main_module is lib/Test/WWW/Selenium.pm [DZ] based on POD in lib/Test/WWW/Selenium.pm, guessing license is Software::License::Perl_5 [DZ] Override README from [ReadmeFromPod] [DZ] writing Test-WWW-Selenium in Test-WWW-Selenium-1.25 [DZ] writing archive to Test-WWW-Selenium-1.25.tar.gz [Git::Check] branch master has some untracked files: [Git::Check] Test-WWW-Selenium-1.25.tar.gz [Git::Check] Test-WWW-Selenium-1.25/Makefile.PL [Git::Check] Test-WWW-Selenium-1.25/README [Git::Check] Test-WWW-Selenium-1.25/build.xml [Git::Check] Test-WWW-Selenium-1.25/dist.ini [Git::Check] Test-WWW-Selenium-1.25/lib/Test/WWW/Selenium.pm [Git::Check] Test-WWW-Selenium-1.25/lib/WWW/Selenium.pm [Git::Check] Test-WWW-Selenium-1.25/lib/WWW/Selenium/Util.pm [Git::Check] Test-WWW-Selenium-1.25/mypod2html.pl [Git::Check] Test-WWW-Selenium-1.25/pom.xml [Git::Check] Test-WWW-Selenium-1.25/t/00-compile.t [Git::Check] Test-WWW-Selenium-1.25/t/01_load.t [Git::Check] Test-WWW-Selenium-1.25/t/WWW/Selenium.pm [Git::Check] Test-WWW-Selenium-1.25/t/files/test_click_page1.html [Git::Check] Test-WWW-Selenium-1.25/t/files/test_click_page2.html [Git::Check] Test-WWW-Selenium-1.25/t/files/test_i18n.html [Git::Check] Test-WWW-Selenium-1.25/t/interweb.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-compat.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-core.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-dwim.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-rc.t [Git::Check] Test-WWW-Selenium-1.25/t/test-selenium.t [Git::Check] Test-WWW-Selenium-1.25/t/test_default_server.t [Git::Check] Test-WWW-Selenium-1.25/t/test_google.t [Git::Check] Test-WWW-Selenium-1.25/t/test_i18n.t [Git::Check] Test-WWW-Selenium-1.25/t/timeouts.t [Git::Check] Test-WWW-Selenium-1.25/target/iedoc.xml [Git::Check] Test-WWW-Selenium-1.25/todo.txt [Git::Check] Test-WWW-Selenium-1.25/util/WWW/Selenium/XMLParseUtils.pm [Git::Check] Test-WWW-Selenium-1.25/util/XMLParseUtils.t [Git::Check] Test-WWW-Selenium-1.25/util/create_www_selenium.pl [Git::Check] Test-WWW-Selenium-1.25/util/fetch_iedoc_xml.pl [Git::Check] Test-WWW-Selenium-1.25/util/test_function.pl [Git::Check] Test-WWW-Selenium-1.25/weaver.ini [Git::Check] Test-WWW-Selenium-1.25/xt/release/distmeta.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/has-version.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/pod-coverage.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/pod-syntax.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/portability.t [Git::Check] branch master has some untracked files: [Git::Check] Test-WWW-Selenium-1.25.tar.gz [Git::Check] Test-WWW-Selenium-1.25/BUILDING_FROM_SELENIUM.txt [Git::Check] Test-WWW-Selenium-1.25/Changes [Git::Check] Test-WWW-Selenium-1.25/MANIFEST [Git::Check] Test-WWW-Selenium-1.25/META.json [Git::Check] Test-WWW-Selenium-1.25/META.yml [Git::Check] Test-WWW-Selenium-1.25/Makefile.PL [Git::Check] Test-WWW-Selenium-1.25/README [Git::Check] Test-WWW-Selenium-1.25/build.xml [Git::Check] Test-WWW-Selenium-1.25/dist.ini [Git::Check] Test-WWW-Selenium-1.25/lib/Test/WWW/Selenium.pm [Git::Check] Test-WWW-Selenium-1.25/lib/WWW/Selenium.pm [Git::Check] Test-WWW-Selenium-1.25/lib/WWW/Selenium/Util.pm [Git::Check] Test-WWW-Selenium-1.25/mypod2html.pl [Git::Check] Test-WWW-Selenium-1.25/pom.xml [Git::Check] Test-WWW-Selenium-1.25/t/00-compile.t [Git::Check] Test-WWW-Selenium-1.25/t/01_load.t [Git::Check] Test-WWW-Selenium-1.25/t/WWW/Selenium.pm [Git::Check] Test-WWW-Selenium-1.25/t/files/test_click_page1.html [Git::Check] Test-WWW-Selenium-1.25/t/files/test_click_page2.html [Git::Check] Test-WWW-Selenium-1.25/t/files/test_i18n.html [Git::Check] Test-WWW-Selenium-1.25/t/interweb.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-compat.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-core.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-dwim.t [Git::Check] Test-WWW-Selenium-1.25/t/selenium-rc.t [Git::Check] Test-WWW-Selenium-1.25/t/test-selenium.t [Git::Check] Test-WWW-Selenium-1.25/t/test_default_server.t [Git::Check] Test-WWW-Selenium-1.25/t/test_google.t [Git::Check] Test-WWW-Selenium-1.25/t/test_i18n.t [Git::Check] Test-WWW-Selenium-1.25/t/timeouts.t [Git::Check] Test-WWW-Selenium-1.25/target/iedoc.xml [Git::Check] Test-WWW-Selenium-1.25/todo.txt [Git::Check] Test-WWW-Selenium-1.25/util/WWW/Selenium/XMLParseUtils.pm [Git::Check] Test-WWW-Selenium-1.25/util/XMLParseUtils.t [Git::Check] Test-WWW-Selenium-1.25/util/create_www_selenium.pl [Git::Check] Test-WWW-Selenium-1.25/util/fetch_iedoc_xml.pl [Git::Check] Test-WWW-Selenium-1.25/util/test_function.pl [Git::Check] Test-WWW-Selenium-1.25/weaver.ini [Git::Check] Test-WWW-Selenium-1.25/xt/release/distmeta.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/has-version.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/pod-coverage.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/pod-syntax.t [Git::Check] Test-WWW-Selenium-1.25/xt/release/portability.t at /home/mattp/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12. -- ~Apocalypse
that seems a good idea. question: what to do when detecting this? better error message? adding them to .gitignore? ignoring them altogether? i think that we should not do much besides better error message - wdyt?
Le 2011-04-29 10:22:08, JQUELIN a écrit : Show quoted text
> that seems a good idea. > question: what to do when detecting this? better error message? adding > them to .gitignore? ignoring them altogether? > > i think that we should not do much besides better error message - wdyt?
I think this should only be warnings. For .build, the warnings should suggest to add '.build' to a global .gitignore: git config --global core.excludesfile ~/.gitignore echo .build>> ~/.gitignore For the distribution, it could suggest: echo "$distname-*" >> .gitignore git commit .gitignore -- Olivier Mengué - http://perlresume.org/DOLMEN
RT-Send-CC: dolmen [...] cpan.org
On Fri, Dec 30, 2011 4:45:50 AM, DOLMEN wrote: Show quoted text
> I think this should only be warnings. > For .build, the warnings should suggest to add '.build' to a global > .gitignore: > git config --global core.excludesfile ~/.gitignore > echo .build>> ~/.gitignore > For the distribution, it could suggest: > echo "$distname-*" >> .gitignore > git commit .gitignore
I'm ok with just giving warnings, but I disagree about the global ~/.gitignore. As I see it, that's for things that are specific to the way you work (e.g. your editor's backup files). Things that anyone who clones the repo will most likely encounter (like directories created by the project's build system) belong in the repo's .gitignore.