Danger: Crash in git_repo.rb

Created on 10 Oct 2016  路  4Comments  路  Source: danger/danger

Report

What did you do?

Run Danger on Bitrise CI. The blue branch is being merged into the pink branch:

screen shot 2016-10-10 at 20 22 49

What did you expect to happen?

For Danger to be run without crashing :smile:

What happened instead?

馃挜:

bundler: failed to load command: danger (/usr/local/bin/danger)
Git::GitExecuteError: git '--git-dir=/Users/vagrant/git/.git' '--work-tree=/Users/vagrant/git' cat-file '-t' ''  2>&1:fatal: Not a valid object name 
  /usr/local/lib/ruby/gems/2.3.0/gems/git-1.3.0/lib/git/lib.rb:937:in `command'
  /usr/local/lib/ruby/gems/2.3.0/gems/git-1.3.0/lib/git/lib.rb:166:in `object_type'
  /usr/local/lib/ruby/gems/2.3.0/gems/git-1.3.0/lib/git/object.rb:301:in `new'
  /usr/local/lib/ruby/gems/2.3.0/gems/danger-3.5.3/lib/danger/scm_source/git_repo.rb:61:in `merge_base'
  /usr/local/lib/ruby/gems/2.3.0/gems/danger-3.5.3/lib/danger/scm_source/git_repo.rb:15:in `diff_for_folder'
  /usr/local/lib/ruby/gems/2.3.0/gems/danger-3.5.3/lib/danger/danger_core/dangerfile.rb:258:in `setup_for_running'
  /usr/local/lib/ruby/gems/2.3.0/gems/danger-3.5.3/lib/danger/danger_core/dangerfile.rb:268:in `run'
  /usr/local/lib/ruby/gems/2.3.0/gems/danger-3.5.3/lib/danger/danger_core/executor.rb:26:in `run'
  /usr/local/lib/ruby/gems/2.3.0/gems/danger-3.5.3/lib/danger/commands/runner.rb:64:in `run'
  /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
  /usr/local/lib/ruby/gems/2.3.0/gems/danger-3.5.3/bin/danger:5:in `<top (required)>'
  /usr/local/bin/danger:23:in `load'
  /usr/local/bin/danger:23:in `<top (required)>'

Your Environment

  • CI: _Bitrise_
  • Danger version: _3.5.3_

Any pointers as to what the issue could be? I'm more than happy to help with fixing :)

Bug Help Wanted

Most helpful comment

Released v3.5.5!

All 4 comments

The error is saying that danger cannot find commits on Bitrise 馃槶 . Possible that when danger is running, someone merged blue branch into pink branch, and reset/rebased then force pushed 馃?

Related: #480 #432 #316 #185 #160

Not that I'm aware, I've searched though our Slack for any force pushes to the blue branch, but nothing to it. Are there any other ways I can check for this?

I don't understand how there are no commits in the difference between these two branches, because there's definitely a diff between them o_O

Fixed in #636.

Released v3.5.5!

Was this page helpful?
0 / 5 - 0 ratings