Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write_codemeta() writes pre-commit hook without user consent #240

Closed
RLumSK opened this issue Aug 2, 2019 · 3 comments
Closed

write_codemeta() writes pre-commit hook without user consent #240

RLumSK opened this issue Aug 2, 2019 · 3 comments

Comments

@RLumSK
Copy link
Contributor

RLumSK commented Aug 2, 2019

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 that write_codemeta() had created a pre-commit hook in my .git folder.

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_hook should be FALSE not TRUE (current setting).

@cboettig
Copy link
Member

cboettig commented Aug 2, 2019

Yup, 💯% with you on this. Want to send a PR altering the default to FALSE, along with the documentation etc?

@RLumSK
Copy link
Contributor Author

RLumSK commented Aug 2, 2019

Sure, I am happy to help (also for the other PR).

RLumSK added a commit to RLumSK/codemetar that referenced this issue Aug 2, 2019
RLumSK added a commit to RLumSK/codemetar that referenced this issue Aug 2, 2019
@RLumSK
Copy link
Contributor Author

RLumSK commented Aug 2, 2019

Done with #239

@RLumSK RLumSK closed this as completed Aug 2, 2019
cboettig pushed a commit that referenced this issue Aug 4, 2019
* 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
cboettig pushed a commit that referenced this issue Aug 5, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants