]> git.ozlabs.org Git - next-scripts/commitdiff
fetch_trees: -n means to start wherever we are up to in the merge
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 1 Jun 2018 04:49:20 +0000 (14:49 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 1 Jun 2018 04:49:20 +0000 (14:49 +1000)
fetch_trees

index d163bba6835fe914cb23dd85ff746c5cf8c06c38..88efd947fb3c2517cb238208adfe84e0322da429 100755 (executable)
@@ -1,5 +1,13 @@
 #!/bin/bash
 
+. "$(dirname $0)/common.sh" ""
+
+[ "$1" = "-n" ] && {
+       shift
+       last=$(tail -n1 $SHA1_FILE | cut -f1 -d$'\t')
+       start_from=$(awk -F '\t' '$3 == "'$last'" { getline; print $3; exit 0; }' $CTRL_FILE)
+}
+
 [ "$1" = "-s" ] && {
        shift
        start_from="$1"
@@ -10,8 +18,6 @@
        shift
 }
 
-. "$(dirname $0)/common.sh" ""
-
 get_field()
 {
        grep -v '^#' $CTRL_FILE |