From 6fa8b6904a6775175dff46f3c0ccf87fa709c788 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 27 Oct 2021 12:13:20 +0200 Subject: Give a -1 when pick-to on a release branch lacks a pick to stable branch This change should help ensure that fixes submitted directly to a release branch (often due to release crunches) make their way upstream to the stable branch. This check is limited to numerically versioned branches, 6.2.0 release branch for example has an upstream stable branch of 6.2. Change-Id: I17f6576c63a40f89802bad97111560086cce1465 Reviewed-by: Edward Welbourne Reviewed-by: Oswald Buddenhagen --- git-hooks/sanitize-commit | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index 71a1afd..3970789 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -592,6 +592,14 @@ if ($with_pickbot) { complain("Omission of $masterName from Pick-to footer might be incorrect", "", -1); } + if ($target =~ /(\d+\.\d+)\.\d+$/) { + # Verify that the upstream stable branch is in the pick-to if the current + # target is a release branch. + if (!exists($picktos{$1})) { + complain("Omission of $1 from the Pick-to footer is probably incorrect", + "cherry") + } + } } else { complain("Omission of Pick-to footer is probably incorrect", "cherry"); } -- cgit v1.2.1