lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.5 vs lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.6
- old
+ new
@@ -80,15 +80,24 @@
raise_if_we_cannot_find_the_commit(commitish) if commit_not_exists?(commitish)
end
def ensure_commitish_exists_on_branch!(branch, commitish)
puts "ensure_commitish_exists_on_branch(#{branch}, commitish=#{commitish})!"
- return if commit_exists?(commitish)
+
+ exists = commit_exists?(commitish)
+ # return if commit_exists?(commitish)
+ if (exists)
+ puts "The commit #{commitish} exists in #{branch}"
+ return
+ else
+ puts "The commit #{commitish} DOES NOT exist in #{branch}"
+ end
+
puts "Is shallow repo:"
- exect("rev-parse --is-shallow-repository")
+ exec("rev-parse --is-shallow-repository")
- puts "last 5 commits befor starting git_fetch_branch_to_depth:"
+ puts "Last 5 commits befor starting git_fetch_branch_to_depth:"
exec("--no-pager log -n 5")
depth = 0
success =
(3..6).any? do |factor|