lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.4 vs lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.5
- old
+ new
@@ -82,17 +82,22 @@
def ensure_commitish_exists_on_branch!(branch, commitish)
puts "ensure_commitish_exists_on_branch(#{branch}, commitish=#{commitish})!"
return if commit_exists?(commitish)
+ puts "Is shallow repo:"
+ exect("rev-parse --is-shallow-repository")
+
+ 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|
depth += Math.exp(factor).to_i
- puts "git_fetch_branch_to_depth(#{branch}, depth=#{depth}), last 5 commits:"
- exec("git --no-pager log -n 5")
+ puts "git_fetch_branch_to_depth(#{branch}, depth=#{depth})"
git_fetch_branch_to_depth(branch, depth)
commit_exists?(commitish)
end
@@ -145,9 +150,11 @@
possible_merge_base
end
def find_merge_base_with_incremental_fetch(repo, from, to)
+ puts "find_merge_base_with_incremental_fetch"
+
from_is_ref = commit_is_ref?(from)
to_is_ref = commit_is_ref?(to)
return unless from_is_ref || to_is_ref