summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorThomas Letan <lthms@soap.coffee>2020-02-17 18:11:33 +0100
committerThomas Letan <lthms@soap.coffee>2020-02-17 18:11:33 +0100
commit0e7ada89ffda1df43a7c320c3e5b5103dfa04a7a (patch)
tree155e28bf8fb2466a7495b6a50eafe79438133eed /scripts
parentKeep track of file renames in the revision table (diff)
Use the previous name after the renaming commit in revision tables
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_history.sh8
1 files changed, 4 insertions, 4 deletions
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}")