From 0e7ada89ffda1df43a7c320c3e5b5103dfa04a7a Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Mon, 17 Feb 2020 18:11:33 +0100 Subject: Use the previous name after the renaming commit in revision tables --- scripts/generate_history.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/generate_history.sh b/scripts/generate_history.sh index 65de78e..cc70d55 100755 --- a/scripts/generate_history.sh +++ b/scripts/generate_history.sh @@ -19,10 +19,6 @@ function generate_history_json () { local pre_name="$(git --no-pager show --stat=10000 ${hash} | sed -e 's/ *\(.*\){\(.*\) => \(.*\)}/\1\2 => \1\3/' | grep "=> ${name}" | xargs | cut -d' ' -f1)" - if [[ ! -z "${pre_name}" ]]; then - name="$(echo ${pre_name})" - fi - if [[ ${count} -eq 0 ]]; then echo -n "[ " else @@ -31,6 +27,10 @@ function generate_history_json () { echo "${line}, \"filename\":\"${name}\"}" + if [[ ! -z "${pre_name}" ]]; then + name="$(echo ${pre_name})" + fi + count=$(( ${count} + 1 )) done < <(echo "${logs}") -- cgit v1.2.3