Skip to contentSkip to conversation

merge_msg: Gather the email addresses for the conflicting tree

PATCH In review Mark Brown 3 participants 3 messages Oct 1 – Oct 2 Linux-next tree

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 merge_msg: Gather the email addresses for the conflicting tree

We have a list of conflicting trees and the contacts file, do the lookup of the contacts programatically. Skip doing so for the origin tree since it's not generally too interesting to tell Linus about these things, and rely on the sending MUA to deduplicate addresses.

---
 merge_msg | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
merge_msg +11 -2
index f781e0b..e95cbaa 100755
@@ -46,6 +46,16 @@ if [ "${#hb[@]}" -gt 1 ]; then
 	hbs='s'
 fi
 
+# Rely on the sending MUA to dedupe
+for b in "${hb[@]}"; do
+	if [ "${b}" = "origin" ]; done
+		continue
+	fi
+	bc=$(../tools/get_contacts ${b})
+	IFS=',' read -r -a addrs <<< ${bc}
+	cc+=("${addrs[@]}")
+done
+
 printf -v subject 'manual merge of the BRANCH tree with the %s tree%s' \
 	"${hb[*]}" "$hbs"
 printf -v update 'The BRANCH tree acquired a conflict with the %s tree%s'. \
@@ -72,8 +82,7 @@ if [ "$#" -gt 1 ]; then
 fi
 
 "$tools_dir/message_helper" "${branch[@]}" "$subject" "${cc[@]}" <<EOF
-FIXME: Add owner of second tree to To:
-       Add author(s)/SOB of conflicting commits.
+FIXME: Add author(s)/SOB of conflicting commits.
 
 Today's linux-next merge of the BRANCH tree got $conf in:
 
Signature · 1 line
2.47.3
#1 lore raw

merge_msg if [ "${#hb[@]}" -gt 1 ]; then · line 51

Quoted 3 lines · Mark Brown
merge_msg +3 -0
+# Rely on the sending MUA to dedupe
+for b in "${hb[@]}"; do
+	if [ "${b}" = "origin" ]; done

I am confused about this 'done' here. Shouldn't it be 'then' ?

Quoted 7 lines
merge_msg +7 -0
+		continue
+	fi
+	bc=$(../tools/get_contacts ${b})
+	IFS=',' read -r -a addrs <<< ${bc}
+	cc+=("${addrs[@]}")
+done
+
#2 lore raw
Quoted 6 lines · Breno Leitao

merge_msg if [ "${#hb[@]}" -gt 1 ]; then · line 51

Quoted 3 lines · Mark Brown
merge_msg +3 -0
+# Rely on the sending MUA to dedupe
+for b in "${hb[@]}"; do
+	if [ "${b}" = "origin" ]; done

I am confused about this 'done' here. Shouldn't it be 'then' ?

Yes, it should be a then - that was a last minute fixup before sending that I obviously garbled.