diff --git a/src/git.coffee b/src/git.coffee index e177c0f..fc58005 100644 --- a/src/git.coffee +++ b/src/git.coffee @@ -36,6 +36,8 @@ module.exports = Git = (git_dir, dot_git) -> prefix = "refs/#{type}s/" git "show-ref", (err, text) -> + # ignore error code 1: means no match + err = null if err?.code is 1 matches = [] for line in (text || "").split("\n") continue if !line