summaryrefslogtreecommitdiffstats
path: root/checkout.sh
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-08-29 02:16:16 -0400
committerMalf Furious <m@lfurio.us>2017-08-29 02:16:16 -0400
commit25edaf328f7ce772ea7c7e923a1e2214b615b7d9 (patch)
treecd2baf4750bbd4412135de795be2f04bf2346494 /checkout.sh
parent50fba4a5d2d664d377e21633a36a84794cd3d0b5 (diff)
downloadsystrunk-25edaf328f7ce772ea7c7e923a1e2214b615b7d9.tar.gz
systrunk-25edaf328f7ce772ea7c7e923a1e2214b615b7d9.zip
Update checkout op
Catch when trying to checkout various reserved commit names, TRAC and BASE needed special attention.
Diffstat (limited to 'checkout.sh')
-rw-r--r--checkout.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/checkout.sh b/checkout.sh
index 9ae1235..59cc82e 100644
--- a/checkout.sh
+++ b/checkout.sh
@@ -92,9 +92,16 @@ function systr_checkout
exit
fi
+ if [[ "$version" == "TRAC" ]]; then
+ version="$TRAC"
+ fi
+
commit=$(systr_repo_resolve_reference "$version")
echo "$commit" >.systr/BASE
- echo "$version" >.systr/TRAC
+
+ if [[ "$version" != "BASE" ]]; then
+ echo "$version" >.systr/TRAC
+ fi
if [[ "$commit" == "NULL" ]]; then
echo "Nothing to checkout"