+
Skip to content

Find gitDirRoot and isGitDir is inconsistent. #1

Open
@gjersvik

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).

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载