Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> --- contrib/cc-cmd/git-cc-cmd | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/contrib/cc-cmd/git-cc-cmd b/contrib/cc-cmd/git-cc-cmd index aecfa45..4bca7f1 100755 --- a/contrib/cc-cmd/git-cc-cmd +++ b/contrib/cc-cmd/git-cc-cmd @@ -126,6 +126,20 @@ class Commits def from_rev_args(args) return if args.empty? + + revs = [] + + File.popen(%w[git rev-parse --revs-only --default=HEAD --symbolic] + args).each do |rev| + revs << rev.chomp + end + + case revs.size + when 1 + committish = [ '%s..HEAD' % revs[0] ] + else + committish = revs + end + source = nil File.popen(%w[git rev-list --reverse] + args) do |p| p.each do |e| -- 1.8.2.1.790.g4588561 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html