From nobody Fri Mar 29 10:27:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557100575; cv=none; d=zoho.com; s=zohoarc; b=WUQn4DxWK6C/VLtCFwbslSkNQiCsQYG7Xdtto3fpIECg2doQqsx8XYEGjwAAY0EWyNEtvrsb+YWPxef7gFE3fU/CCEt7pUIgxeUmm2RGPrJ4B+UN6NXyjGiOk5lLtwMHkpLKgMSvp6gKsLFtuSAMOWo5uYwfSPAzdBOEj08J53Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557100575; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=iwlFqYKKJ1RLTiC+C8hbQCfSiGiyiWTBC1kO3MKgvcQ=; b=GrEKWwXFPIOmu1e2zQMumSSWUW5R9xvELVsuMj6X2MlfpcFTevvzA2dqD2qIKkPEHET5ityxQtjTdbnJhYrzfTDJS28XJgIkhNGtoNhpR4I4lN5Ns5HVIZ30JFauRBjMNfrIbkif7B1cwWniBNxCx301Pi8tjPOKZnTLjLU93C0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1557100575299248.26072389996034; Sun, 5 May 2019 16:56:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E0123082E23; Sun, 5 May 2019 23:56:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E91EA1001E86; Sun, 5 May 2019 23:56:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 83F8E18089C8; Sun, 5 May 2019 23:56:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x45NuBPa018969 for ; Sun, 5 May 2019 19:56:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2A580608A4; Sun, 5 May 2019 23:56:11 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 252EB611A2 for ; Sun, 5 May 2019 23:56:09 +0000 (UTC) Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7703BC4EA9 for ; Sun, 5 May 2019 23:56:08 +0000 (UTC) Received: by mail-ot1-f67.google.com with SMTP id w6so9956653otl.7 for ; Sun, 05 May 2019 16:56:08 -0700 (PDT) Received: from donizetti.dfw02.dal.wayport.net ([12.184.218.54]) by smtp.gmail.com with ESMTPSA id f5sm3588392otp.16.2019.05.05.16.56.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 May 2019 16:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=m3MkTg/EjY1qMnUKWZOpwreyL8756d8hLQ9ZfCrBQ0A=; b=sV9eZNfV7SSoTY9K7Z6bRlWSlw1jg2y8Hhioh7FO2X/e6XDY7VbA/e/IV6Z208CdW5 svS9woLEWKOowW9CJtr3+nK7ze9ioQv7/0GG/ktU6m5K2yeYGoLNRYQtcK08CuXnxT7i YsBT5WOwnOQ8I/UGO9JZwaKmxrM9qJD7NggreGULa5OzyW7VwdFmQ43ukPfLDC2itPQb FMFl6+/eWT1SgOVGg/WnbGdZfHMyUh5L+VWq93nNsvaOplFNQgKY7oqa/GJN0UMB8bC4 GaFPWspF9KMfkIK3LxL43ubqVquRe6u2GdVqzIKzifgtBSSxRnBrfdL17NUiOe1tqIyt UNcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=m3MkTg/EjY1qMnUKWZOpwreyL8756d8hLQ9ZfCrBQ0A=; b=cRKpdHzJbQZSOhmKbe8PWT3Abwb0oxbJIyb1oLqz/Cbw9aRnpwWZUaTARVMokRrvDe WHQ6cTkCd8iBm8+wR0CfulTZ1WZgAPfuDz/K6C+jQ5yLNxtrVbHnRXSFxwfyjtHHnzcg CRO/5PFit2wsF4lTXetrjLosq4y/cyT93XZZxiBqteWSv+U30dI/eCnA9GjBln1joXGQ Kzos1019vFVsrhrKqy0ZGRjnpmG223wSk0ZUCmX0OvPtm6Ig+/nmmcwuwz9y8M7uo8lA KrbEuzQ2Hs7sc26uARBLhhTnUzIN3S0izIgdrB9ah/EoUoHYFh+KfOkB4fbcNzaudMz1 xwGg== X-Gm-Message-State: APjAAAUprCRZKWRalp1NZ7z9F5+0f7vwStlHcS1Bj90/135j6UK7c2kK ZX/l5KbztgZlasN4G+sIxILnCj87 X-Google-Smtp-Source: APXvYqxbsvGYqlOv0Mu49tpwk9YCdO74h23ipWmQr3mIgtMBSPuy+s5JmN3chv8UQgj0xpwr7w2JPg== X-Received: by 2002:a9d:6f02:: with SMTP id n2mr7925922otq.190.1557100567605; Sun, 05 May 2019 16:56:07 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Sun, 5 May 2019 18:56:06 -0500 Message-Id: <20190505235606.8019-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 05 May 2019 23:56:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 05 May 2019 23:56:08 +0000 (UTC) for IP:'209.85.210.67' DOMAIN:'mail-ot1-f67.google.com' HELO:'mail-ot1-f67.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.092 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.210.67 mail-ot1-f67.google.com 209.85.210.67 mail-ot1-f67.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] mbox: recognize patch consisting entirely of GIT binary diffs X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Sun, 05 May 2019 23:56:13 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" A patch consisting entirely of binary diffs is not recognized by Patch. Make Mbox.is_patch detect binary diffs to fix it. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- mbox.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/mbox.py b/mbox.py index 47a770f..16b3fc9 100644 --- a/mbox.py +++ b/mbox.py @@ -253,18 +253,9 @@ class MboxMessage(object): body =3D self.get_body() if self.get_subject().startswith("Re:"): return False - return self._has_lines(body, - "---", - "diff ", - "index ", - "---", - "+++", - "@@") or \ - self._has_lines(body, - "---", - "diff ", - "old mode ", - "new mode ") + return self._has_lines(body, "---", "diff ", "index ", "---", "+++= ", "@@") or \ + self._has_lines(body, "---", "diff ", "index ", "GIT binary= patch") or \ + self._has_lines(body, "---", "diff ", "old mode ", "new mod= e ") =20 def is_series_head(self): """Create and return a Series from Message if it is one, otherwise --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel