lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.3 vs lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.4
- old
+ new
@@ -86,11 +86,13 @@
depth = 0
success =
(3..6).any? do |factor|
depth += Math.exp(factor).to_i
- puts "git_fetch_branch_to_depth(#{branch}, depth=#{depth})"
+
+ puts "git_fetch_branch_to_depth(#{branch}, depth=#{depth}), last 5 commits:"
+ exec("git --no-pager log -n 5")
git_fetch_branch_to_depth(branch, depth)
commit_exists?(commitish)
end
@@ -105,9 +107,10 @@
def git_in_depth_fetch
exec("fetch --depth 1000000")
end
def git_fetch_branch_to_depth(branch, depth)
+ puts "fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}"
exec("fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}")
end
def default_env
{ "LANG" => "en_US.UTF-8" }