File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -351,14 +351,12 @@ Repository.initExt = function(repo_path, opts) {
351351
352352Repository . getReferences = function ( repo , type , refNamesOnly ) {
353353 return repo . getReferences ( ) . then ( function ( refList ) {
354- var filteredRefList = refList ;
355-
356- filteredRefList . filter ( function ( reference ) {
357- return type == Reference . TYPE . LISTALL || reference . type === type ;
354+ var filteredRefList = refList . filter ( function ( reference ) {
355+ return type === Reference . TYPE . ALL || reference . type === type ;
358356 } ) ;
359357
360358 if ( refNamesOnly ) {
361- filteredRefList . map ( function ( reference ) {
359+ return filteredRefList . map ( function ( reference ) {
362360 return reference . name ( ) ;
363361 } ) ;
364362 }
@@ -1255,8 +1253,8 @@ Repository.prototype.getReferenceCommit = function(name, callback) {
12551253 * @param {Reference.TYPE } type Type of reference to look up
12561254 * @return {Array<String> }
12571255 */
1258- Repository . prototype . getReferenceNames = function ( type , callback ) {
1259- return Repository . getReferences ( this , type , true , callback ) ;
1256+ Repository . prototype . getReferenceNames = function ( type ) {
1257+ return Repository . getReferences ( this , type , true ) ;
12601258} ;
12611259
12621260/**
You can’t perform that action at this time.
0 commit comments