isomorphic-git / isomorphic-git/isomorphic-git

unexpected behavior of getRemoteInfo when branch name includes slash

Open
#1,041 1 comment 1 reaction 1 assignee Claimed by @billiegoose View on GitHub
docs types
Dominant language
JavaScript
Stars
8.4k
Forks
491
Avg merge
2h 53m
Merged PRs (30d)
7

Description

Using Node 10
According to [getRemoteInfo specs](https://isomorphic-git.org/docs/en/getRemoteInfo), `refs.heads` should be of type `Object`, however when repository has a branch with `/` in it (for e.g `feature/foo`) then returned value is `object` and not `string` (would get something like `{ "feature": { "foo": } }` instead of `{ "feature/foo": }`)

In [getRemoteInfo.js:81](https://github.com/isomorphic-git/isomorphic-git/blob/master/src/commands/getRemoteInfo.js#L81) there's a `split()` with `/` so I assume this is expected but the specs are somewhat misleading about that.

I guess you should either support `/` in branch name or change specs accordingly.
Thanks 🙃

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.