From 8fc45466036dc3e34bece94e6c85ca5cd21355a7 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 13 Aug 2025 20:31:18 +1000 Subject: [PATCH] replace empty fields in the control file with '-' So that they are easier to see --- common.sh | 3 ++- do_merge | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common.sh b/common.sh index 667c0eb..50dab59 100644 --- a/common.sh +++ b/common.sh @@ -77,7 +77,8 @@ _TAB=$(printf '\t') get_control_field() { - awk -F "$_TAB" -v branch="$1" -v field="$2" '/^[^-#]/ && $3==branch { print $field; }' "$CTRL_FILE" + # if the field is just '-' print nothing + awk -F "$_TAB" -v branch="$1" -v field="$2" '/^[^-#]/ && $3==branch { if ($f=="-") print""; else print $field; }' "$CTRL_FILE" } get_branches() diff --git a/do_merge b/do_merge index c3e1785..509b7c5 100755 --- a/do_merge +++ b/do_merge @@ -123,6 +123,9 @@ for h in $heads; do tree=$arg1 branch=$arg2 + if [ "X$branch" = 'X-' ]; then + branch='' + fi h="$tree${branch:+/$branch}" hlog=$(git log -1 --oneline "$h") 2>/dev/null old_head=$(git rev-parse HEAD) -- 2.47.3