aboutsummaryrefslogtreecommitdiffstats
path: root/blame/blame2humantest.bash
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-12-12 03:22:52 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2015-12-12 03:22:52 +0100
commitb543e4e02793a58db25148214ef149cb571792f5 (patch)
treed68b7e33aba06f67d3c3e301b4a68f09de0ded6a /blame/blame2humantest.bash
parentc22c181f70e0afb294513315e9975b9f3f4c1d39 (diff)
downloadgo-git-b543e4e02793a58db25148214ef149cb571792f5.tar.gz
blame code reorganization, and mutting the test
Diffstat (limited to 'blame/blame2humantest.bash')
-rwxr-xr-xblame/blame2humantest.bash47
1 files changed, 0 insertions, 47 deletions
diff --git a/blame/blame2humantest.bash b/blame/blame2humantest.bash
deleted file mode 100755
index 259988f..0000000
--- a/blame/blame2humantest.bash
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-
-set -e
-
-repo=`git remote show origin | grep Fetch | cut -d' ' -f5`
-branch="master"
-if [ "$#" -eq 1 ] ; then
- commit=`git log | head -1 | cut -d' ' -f2`
- path=$1
-elif [ "$#" -eq 2 ] ; then
- commit=$1
- path=$2
-else
- echo "bad number of parameters" > /dev/stderr
- echo > /dev/stderr
- echo " try with: [commit] path" > /dev/stderr
- exit
-fi
-
-blames=`git blame --root $path | cut -d' ' -f1`
-declare -a blame
-i=0
-for shortBlame in $blames ; do
- blame[$i]=`git show $shortBlame | head -1 | cut -d' ' -f2`
- i=`expr $i + 1`
-done
-
-# some remotes have the .git, other don't,
-# repoDot makes sure all have
-repoDot="${repo%.git}.git"
-
-echo -e "\t{\"${repoDot}\", \"${branch}\", \"${commit}\", \"${path}\", concat(&[]string{},"
-prev=""
-count=1
-for i in ${blame[@]} ; do
- if [ "${prev}" == "" ] ; then
- prev=$i
- elif [ "$prev" == "$i" ] ; then
- count=`expr $count + 1`
- else
- echo -e "\t\trepeat(\"${prev}\", $count),"
- count=1
- prev=$i
- fi
-done
-echo -e "\t\trepeat(\"${prev}\", $count),"
-echo -e "\t)},"