Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upwrite_codemeta() writes pre-commit hook without user consent #240
Comments
|
Yup, |
|
Sure, I am happy to help (also for the other PR). |
|
Done with #239 |
* Add tempdir() to avoid to writing guess_other_metadata() into the parent directory. * + swap the default + updating the roxygen docs * + Add myself as a ctb in DESCRIPTION * + mention of changes in NEWS.md + linking this PR * Address #240 and avoid pre-commit hook without user consent * Correct link in NEWS.md #240 * Modify the way the file size is calculated. + Amend guess_fileSize() in guess_other_metadata.R as proposed #239 + Update tests + Drop dependency to 'pkgbuild' + Add NEWS in NEWS.md * Modify the way the file size is calculated. + Amend guess_fileSize() in guess_other_metadata.R as proposed #239 + Update tests + Drop dependency to 'pkgbuild' + Update documentation in 'write_codemeta()' + Upddate corresponding Rd-files + Add NEWS in NEWS.md
* Add tempdir() to avoid to writing guess_other_metadata() into the parent directory. * + swap the default + updating the roxygen docs * + Add myself as a ctb in DESCRIPTION * + mention of changes in NEWS.md + linking this PR * Address #240 and avoid pre-commit hook without user consent * Correct link in NEWS.md #240 * Modify the way the file size is calculated. + Amend guess_fileSize() in guess_other_metadata.R as proposed #239 + Update tests + Drop dependency to 'pkgbuild' + Add NEWS in NEWS.md * Modify the way the file size is calculated. + Amend guess_fileSize() in guess_other_metadata.R as proposed #239 + Update tests + Drop dependency to 'pkgbuild' + Update documentation in 'write_codemeta()' + Upddate corresponding Rd-files + Add NEWS in NEWS.md * Address #238 + Add NEWS * Update tests and add CITATION_ex2 #241
Background
Today I tried the 'codemetar' package for the first time, but I stopped using it for the moment due to the issue reported earlier. Anyway, I had tried
write_codemeta()and decided to wait for the fix. Later, when I worked on the package for which I had tested 'codemetar' and tried to commit the changes, I got a bizarre git message, telling me that my codemeta.json is not up-to-date. This message was surprising since I could not use 'codemetar' for the moment and thus here was no *.json file. It took me a while to figure out thatwrite_codemeta()had created a pre-commit hook in my.gitfolder.Suggestion
I understand the reason for the hook, it is a reasonable idea, but it should be implemented differently. When using
write_codemeta()that last thing I did expect to happen was that the package makes, by default changes in my git environment. From my perspective, this is not covered by the CRAN policy, for a good reason (somehow similar to the issue given reason for my PR #239)I suggest that the default option for the argument
use_git_hookshould beFALSEnotTRUE(current setting).