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

absence of hooks directory is not definitive test for git repo #888

Closed
jennybc opened this issue Aug 4, 2015 · 4 comments
Closed

absence of hooks directory is not definitive test for git repo #888

jennybc opened this issue Aug 4, 2015 · 4 comments

Comments

@jennybc
Copy link
Member

jennybc commented Aug 4, 2015

I confess: I created a git repo using sourcetree instead of git init or RStudio. Apparently this can lead to a repo in which the .git directory does not contains a hooks subdirectory. Even after you've made a commit. So when I attempt to use devtools::use_readme_rmd(), I hit this code in use_git_hook() and get Error: This project doesn't use git. Apparently there are other ways to have a valid git repo and yet NOT have a hooks subdirectory.

I admit this maybe a rare phenomenon. Not sure if a different error message is the way to go or just outright creation of hooks.

@jennybc
Copy link
Member Author

jennybc commented Aug 6, 2015

FWIW, from reading Git docs and my own experience, it seems perfectly OK to create the .git/hooks subdirectory de novo and carry on.

@hadley
Copy link
Member

hadley commented Sep 2, 2015

Agreed. Want to do a PR or want me to do it?

@jennybc
Copy link
Member Author

jennybc commented Sep 2, 2015

I am happy either way. Was planning to PR this after the one other played itself out. This is much smaller thing.

@hadley hadley closed this as completed in abd0473 Sep 3, 2015
@lock
Copy link

lock bot commented Sep 18, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants