+tools_dir=$(dirname "$0")
+# shellcheck source=/dev/null
+. "$tools_dir/common.sh" ''
+
+if [ "$1" = '-n' ]; then
+ shift
+ last=$(tail -n1 "$SHA1_FILE" | cut -f1 -d$'\t')
+ start_from=$(awk -F '\t' '/^[^#]/ && $3 == "'"$last"'" {
+ do
+ getline;
+ while (/^#/ || $2 == "branch");
+ print $3;
+ exit 0;
+ }' "$CTRL_FILE")
+fi
+
+if [ "$1" = '-s' ]; then