From e371a21240d2b10f3f13356c4efbdef3c8eb0d7e Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Tue, 30 Jun 2015 09:10:25 -0700 Subject: [PATCH] keep it simple --- git-diff-merge-conflict-resolution | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/git-diff-merge-conflict-resolution b/git-diff-merge-conflict-resolution index edaa548..c9cd8c5 100755 --- a/git-diff-merge-conflict-resolution +++ b/git-diff-merge-conflict-resolution @@ -1,14 +1,3 @@ -#!/usr/bin/env ruby -w +#!/bin/zsh -treeish = ARGV.shift || 'HEAD' -output = nil -loop do - puts "git diff-tree --color --cc #{treeish}" - output = `git diff-tree --color --cc #{treeish}` - len = output.strip.length == 40 - break if !$?.success? || len == 0 || len == 40 - treeish = `git log -n1 #{treeish} | head -n2 | tail -n1`.strip.split[1] - puts treeish - break unless treeish =~ /^[0-9a-f]{7}$/ -end -puts output +git diff-tree --color --cc "${1:-HEAD}" \ No newline at end of file