Method: Overcommit::HookContext::PreRebase#rebased_commits

Defined in:
lib/overcommit/hook_context/pre_rebase.rb

#rebased_commitsObject

Returns the SHA1-sums of the series of commits to be rebased in reverse topological order.



31
32
33
34
35
36
# File 'lib/overcommit/hook_context/pre_rebase.rb', line 31

def rebased_commits
  rebased_ref = detached_head? ? 'HEAD' : rebased_branch
  @rebased_commits ||=
    `git rev-list --topo-order --reverse #{upstream_branch}..#{rebased_ref}`.
      split("\n")
end