lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.9 vs lib/danger/scm_source/git_repo.rb in danger-additional-logging-0.0.10
- old
+ new
@@ -96,14 +96,11 @@
return
else
puts "The commit #{commitish} DOES NOT exist in #{branch}"
end
- puts "Is shallow repo:"
- exec("rev-parse --is-shallow-repository", true)
-
- puts "Last 5 commits for #{branch}"
+ puts "Last 3 commits for current branch"
exec("branch -v", true)
exec("--no-pager log -n 5", true)
depth = 0
success =
@@ -128,11 +125,11 @@
def git_in_depth_fetch
exec("fetch --depth 1000000")
end
def git_fetch_branch_to_depth(branch, depth)
- exec("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}", true)
end
def default_env
{ "LANG" => "en_US.UTF-8" }
end
@@ -148,15 +145,17 @@
def commit_not_exists?(sha1)
exec("rev-parse --quiet --verify #{sha1}^{commit}").empty?
end
def find_merge_base(repo, from, to)
- puts "find_merge_base(repo=#{repo}, from=#{from}, to=#{to})"
+ puts "find_merge_base(from=#{from}, to=#{to})"
possible_merge_base = possible_merge_base(repo, from, to)
+ puts "possible_merge_base result: #{possible_merge_base}"
return possible_merge_base if possible_merge_base
possible_merge_base = find_merge_base_with_incremental_fetch(repo, from, to)
+ puts "find_merge_base_with_incremental_fetch result: #{possible_merge_base}"
return possible_merge_base if possible_merge_base
git_in_depth_fetch
possible_merge_base = possible_merge_base(repo, from, to)