From 51016550c30c64f8cd78cbc10e1eb9ca536a6743 Mon Sep 17 00:00:00 2001 From: Ross Allen Date: Thu, 11 Jun 2015 13:45:06 -0700 Subject: [PATCH] Add missing docs for GitRepository Add argument and return type docs to fill in the documentation site. --- src/git-repository.coffee | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/git-repository.coffee b/src/git-repository.coffee index 145b2bf96..09ae42dcf 100644 --- a/src/git-repository.coffee +++ b/src/git-repository.coffee @@ -120,6 +120,10 @@ class GitRepository # Public: Invoke the given callback when this GitRepository's destroy() method # is invoked. + # + # * `callback` {Function} + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. onDidDestroy: (callback) -> @emitter.on 'did-destroy', callback @@ -273,14 +277,24 @@ class GitRepository ### # Public: Returns true if the given path is modified. + # + # * `path` The {String} path to check. + # + # Returns a {Boolean} that's true if the `path` is modified. isPathModified: (path) -> @isStatusModified(@getPathStatus(path)) # Public: Returns true if the given path is new. + # + # * `path` The {String} path to check. + # + # Returns a {Boolean} that's true if the `path` is new. isPathNew: (path) -> @isStatusNew(@getPathStatus(path)) # Public: Is the given path ignored? # - # Returns a {Boolean}. + # * `path` The {String} path to check. + # + # Returns a {Boolean} that's true if the `path` is ignored. isPathIgnored: (path) -> @getRepo().isIgnored(@relativize(path)) # Public: Get the status of a directory in the repository's working directory. @@ -327,9 +341,17 @@ class GitRepository @statuses[@relativize(path)] # Public: Returns true if the given status indicates modification. + # + # * `status` A {Number} representing the status. + # + # Returns a {Boolean} that's true if the `status` indicates modification. isStatusModified: (status) -> @getRepo().isStatusModified(status) # Public: Returns true if the given status indicates a new path. + # + # * `status` A {Number} representing the status. + # + # Returns a {Boolean} that's true if the `status` indicates a new path. isStatusNew: (status) -> @getRepo().isStatusNew(status) ###