diff options
author | Malf Furious <m@lfurio.us> | 2017-04-28 01:42:03 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2017-04-28 01:42:03 -0400 |
commit | d783362b4847d95d3bfe98f52c52fb1e440590e5 (patch) | |
tree | 55221114d72847ab3abfdf27a0e7f40268acff53 | |
parent | c9c0749416f848d07f33feb2b37bc09c97caf73d (diff) | |
download | systrunk-d783362b4847d95d3bfe98f52c52fb1e440590e5.tar.gz systrunk-d783362b4847d95d3bfe98f52c52fb1e440590e5.zip |
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.
-rw-r--r-- | resolvers.sh | 8 |
1 files changed, 7 insertions, 1 deletions
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" |