no_build=true
;;
s)
+ if [ -f "$SHA1_FILE" ]; then
+ printf '%s: %s exists, so -s is invalid\n' "$0" "$SHA1_FILE" 1>&2
+ exit 1
+ fi
start_from="$OPTARG"
;;
*)
}
if [ -f "$SHA1_FILE" ]; then
- last=$(tail -n1 "$SHA1_FILE" | cut -f1 -d"$_TAB")
- start_from=$(get_branches | sed -n '/^'"$last"'$/{n;p;}')
- if [ -z "$start_from" ]; then
- printf '%s: %s exists but cannot find next tree\n' "$0" "$SHA1_FILE" 1>&2
- exit 1
- fi
-fi
-if [ -z "$start_from" ]; then
+ previous_tree=$(tail -n1 "$SHA1_FILE" | cut -f1 -d"$_TAB")
+elif [ -z "$start_from" ]; then
cp /dev/null "$LOG_FILE"
execute date -R
execute git checkout master
tree=${h%%/*}
branch=${h#"$tree"/}
- if [ -n "$start_from" ]; then
+ if [ -n "$previous_tree" ]; then
+ if [ "$tree" = "$previous_tree" ]; then
+ previous_tree=''
+ fi
+ continue
+ elif [ -n "$start_from" ]; then
if [ "$tree" = "$start_from" ]; then
start_from=""
else