Skip to content

Commit c5b6056

Browse files
johanneswuerbachAudrey Eschright
authored andcommitted
Handle git branch references correctly (#123)
PR-URL: #123 Credit: @johanneswuerbach Reviewed-By: @aeschright
1 parent 41f1552 commit c5b6056

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/shrinkwrap.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ function childVersion (top, child, req) {
167167
function childRequested (top, child, requested) {
168168
if (requested.type === 'directory' || requested.type === 'file') {
169169
return 'file:' + unixFormatPath(path.relative(top.path, child.package._resolved || requested.fetchSpec))
170+
} else if (requested.type === 'git' && child.package._from) {
171+
return child.package._from
170172
} else if (!isRegistry(requested) && !child.fromBundle) {
171173
return child.package._resolved || requested.saveSpec || requested.rawSpec
172174
} else if (requested.type === 'tag') {

0 commit comments

Comments
 (0)