Skip to content

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

Description

@jennybc

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions