From 4fdcb38d5b4efbd4efc8e618ae4975b5a2a72e73 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 1 Jun 2018 14:49:20 +1000 Subject: [PATCH] fetch_trees: -n means to start wherever we are up to in the merge --- fetch_trees | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fetch_trees b/fetch_trees index d163bba..88efd94 100755 --- a/fetch_trees +++ b/fetch_trees @@ -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 | -- 2.39.2