1
0
mirror of https://github.com/danog/gift.git synced 2024-11-30 04:19:37 +01:00

src/repo: fixed single argument form of ls_files

This commit is contained in:
Luke Plaster 2016-09-02 12:02:44 +08:00
parent 0c394739d6
commit 155c6f7d6a

View File

@ -293,8 +293,12 @@ module.exports = class Repo
# callback - Receives `(err,stdout)`.
#
ls_files: (files, options, callback) ->
# support the single arg sig
if arguments.length == 1
callback = files
files = null
# support the old (options, callback) sig
if arguments.length < 3
else if arguments.length < 3
[options, callback] = [files, options]
files = null
callback ?= ->