From a0eace456c9973c00e4fdca4961ccb4bcbcda97c Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 19 Jan 2023 10:56:19 +1100 Subject: [PATCH] do_merge: add the -c (continue) option This starts mergeing again from where we left off i.e. the tree after the last entry in the SHA`s file. --- do_merge | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/do_merge b/do_merge index b678993..c3d3ead 100755 --- a/do_merge +++ b/do_merge @@ -2,9 +2,14 @@ no_build=false start_from="" +do_continue=false -while getopts 'ns:' opt; do +while getopts 'cns:' opt; do case "$opt" in + c) + do_continue=true + ;; + n) no_build=true ;; @@ -48,6 +53,10 @@ fix_up() fi } +if $do_continue; then + last=$(tail -n1 "$SHA1_FILE" | cut -f1 -d"$_TAB") + start_from=$(get_branches | sed -n '/^'"$last"'$/{n;p;}') +fi if [ -z "$start_from" ]; then cp /dev/null "$LOG_FILE" execute date -R -- 2.39.5