≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1728

Bug #1728: Don't barf when hitting repos#show for an empty repo (ie a repo with no commits yet)

Kind bug
Product wincent.dev
When 2010-11-06T14:18:36Z
Status open
Reporter Greg Hurrell
Tags no tags

Description

Should probably handle completely empty repos (as in, repos with no commits) a little bit more gracefully.

Hitting repos#show for a repository which hasn't been pushed into yet raises an exception:

Git::CommandError: non-zero exit status (1) for args: git show-ref --head

So we probably want to handle that explicitly down at the library level (ie. returning nil for stuff like HEAD which doesn't exist yet, and empty arrays for commit listings etc).

Comments

  1. Greg Hurrell 2010-11-06T14:19:00Z

    Summary changed:

    • From: Don't barf for empty repos
    • To: Don't barf when hitting repos#show for an empty repo (ie a repo with no commits yet)
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets