Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Unnecessary getSubmodulePaths #51

@cblp

Description

@cblp

I'm trying to solve one particular problem — to get a branch name for a repository inside a given path.

I'm doing

var GitUtils = require('git-utils')
console.log(GitUtils.open(path).getShortHead())

But open performs too slow on sshfs. It takes about 5 or 6 seconds to getSubmodulePaths. The other code takes about 10 ms.

I suggest to delay openSubmodules for the time when it will be needed, and to not call it in open.

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