From d783362b4847d95d3bfe98f52c52fb1e440590e5 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Fri, 28 Apr 2017 01:42:03 -0400 Subject: Fix bug resolving TRAC if TRAC is attached to a branch The script was going from TRAC -> refs/name -> refs/refs/name and hitting an error. Now, the value of TRAC is re-resolved to get a commit ID. --- resolvers.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'resolvers.sh') diff --git a/resolvers.sh b/resolvers.sh index ff4e38f..80781c3 100644 --- a/resolvers.sh +++ b/resolvers.sh @@ -15,7 +15,8 @@ function get_commit cat ".systr/BASE" elif [[ "$1" == "TRAC" ]]; then - cat ".systr/TRAC" + read trac <.systr/TRAC + get_commit "$trac" elif [[ "$1" == "NULL" ]]; then echo "NULL" @@ -23,6 +24,11 @@ function get_commit elif [ -f "$path/refs/$1" ]; then cat "$path/refs/$1" + elif [[ ${1:0:5} == "refs/" ]]; then + if [ -f "$path/$1" ]; then + cat "$path/$1" + fi + elif [ -f "$path/$1/.commit.systr" ]; then echo "$1" -- cgit v1.2.3