dang (version 0.0.10)

inGit: Are we in a git repository?

Description

This function recursively ascends the filesystem tree from the given directory until it either finds a directory .git, or the top-level directory to abort the search.

Usage

inGit(cwd = getwd())

Arguments

cwd

The start directory, default to the current working directory

Value

A boolean value indicating whether or not the given directory is, in fact, in a git repository.

Details

On Windows, FALSE is returned unconditionally.

Examples

Run this code
# NOT RUN {
inGit()
# }

Run the code above in your browser using DataCamp Workspace