From 09b273453f2a970980994506bbd1063a52e57aa2 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Sun, 27 May 2012 18:48:19 +1000 Subject: [PATCH] merge_msg: allow for specifyin the tree on the command line --- merge_msg | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/merge_msg b/merge_msg index 547fbb9..b314ed2 100755 --- a/merge_msg +++ b/merge_msg @@ -5,9 +5,17 @@ log=../merge.log control=../real_control [ -f real_control ] && control=real_control -branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//') -branch=${branch#quilt/} -branch=${branch%%/*} +branch="" +[ "$1" = "-t" ] && { + branch=$2 + shift 2 +} + +[ "$branch" ] || { + branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//') + branch=${branch#quilt/} + branch=${branch%%/*} +} contact=$(awk -F ' ' '$3=="'"$branch"'" { print $1; }' $control) greeting=${contact%% *} -- 2.39.5