[PATCH] dim: check pull request baselines
Maxime Ripard
maxime.ripard at bootlin.com
Tue Feb 19 14:29:42 UTC 2019
On Tue, Feb 19, 2019 at 02:04:12PM +0100, Daniel Vetter wrote:
> We want explicit backmerges when a pull request pulls in random other
> stuff. Motivated by a few recent examples.
>
> Cc: Maxime Ripard <maxime.ripard at bootlin.com>
> Cc: Dave Airlie <airlied at linux.ie>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> dim | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/dim b/dim
> index 06188fea94c6..016cd4381f38 100755
> --- a/dim
> +++ b/dim
> @@ -1048,6 +1048,23 @@ function apply_patch #patch_file
> return $rv
> }
>
> +function check_merge_baseline
> +{
> + local pull_sha1 baseline_sha1 upstream_sha1
> + pull_sha1=$1
> + baseline_sha1=$2
> + upstream_sha1=$3
> +
> + # the merge base between the pull and upstream is supposed to be in our
> + # tree already
> + if ! git merge-base --is-ancestor $(git merge-base $pull_sha1 $upstream_sha1) $baseline_sha1 ; then
> + echoerr "Pull request contains commits from $upstream_sha1"
> + echoerr "Please backmerge first"
> +
> + warn_of_fail "Issues in pull request detected"
Wouldn't that be warn_or_fail instead?
Once fixed,
Acked-by: Maxime Ripard <maxime.ripard at bootlin.com>
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dim-tools/attachments/20190219/f7ce3af1/attachment.sig>
More information about the dim-tools
mailing list