I'm trying to solve one particular problem — to get a branch name for a repository inside a given path. I'm doing ``` js 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`.
I'm trying to solve one particular problem — to get a branch name for a repository inside a given path.
I'm doing
But
openperforms too slow on sshfs. It takes about 5 or 6 seconds togetSubmodulePaths. The other code takes about 10 ms.I suggest to delay
openSubmodulesfor the time when it will be needed, and to not call it inopen.