Sitelet https://github.com/kevmoo/git/issues/1
Skip to content

Find gitDirRoot and isGitDir is inconsistent. #1

Description

@gjersvik

I have a problem wit pragmatically finding get a GitDir for a given directory.
GitDir.fromExisting need the root dir or no dice.
GitDir.isGitDir returns true even on subdir of a git project. And i feel that is a bit inconsistent.

I would love one of the following:
GitDir.isGitRootDir(path)
GitDir.fromExisting works if you give it a sub directory of a git reposetory.
GitDir.findRoot(path).

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions