Usethis: use_readme_rmd ingests git hook

Created on 20 Dec 2018  路  2Comments  路  Source: r-lib/usethis

Currently use_readme_rmd() does ingest a pre commit Git hook into the package's local git repository. There are two problems resulting from this: (1) This hook also prevents updates of the repo when the Rmd-file is simply re-rendered (e.g. automatically obtained information is updated). (2) User are neither informed about the ingestion happening and have no possibility to prevent it.

This is related to the discussion found here https://github.com/r-lib/usethis/issues/312 and to that found here https://twitter.com/jeroenhjanssens/status/1075010648587886592.

I have forked this repo and will file a pull request with a possible solution that will ...

  1. allow users to opt in or opt out per function argument,
  2. will default to opt out in non-interactive environments,
  3. will ask user what to do in case of an interactive session,
  4. and will have tests covering the new adopted behaviour.
feature git

Most helpful comment

We could consider

  • Messaging when the hook is created, to build awareness.
  • Asking whether to create the hook.

All 2 comments

Given that no one else has reported any problems with it, and the complexity of your proposed solution, I would rather simply encouraging people to delete the hook if they find it annoying.

We could consider

  • Messaging when the hook is created, to build awareness.
  • Asking whether to create the hook.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jennybc picture jennybc  路  7Comments

xrobin picture xrobin  路  7Comments

uribo picture uribo  路  5Comments

rpruim picture rpruim  路  5Comments

malcolmbarrett picture malcolmbarrett  路  4Comments