Skip to content

Commit

Permalink
git.refs: ignore error code 1 which means that no refs are available.
Browse files Browse the repository at this point in the history
  • Loading branch information
feugy committed Sep 17, 2012
1 parent 6045289 commit c20c50b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/git.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c20c50b

Please sign in to comment.