Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2640048ybg; Sat, 19 Oct 2019 20:20:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7gwZQigeFUVMpW9whgIFcGEio1d948yddetNdDa/NbdIHnaR2K1jRDKsRJhndFCbPQS4j X-Received: by 2002:a50:bac2:: with SMTP id x60mr17686561ede.96.1571541646171; Sat, 19 Oct 2019 20:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571541646; cv=none; d=google.com; s=arc-20160816; b=E1+1Z63CyBO2sZWI2YRvRPL797Nplm6+upHOOcLZFapNZtP2Hn1IfeFn/CCqdYtiEk L2k/TfTdjy52QSdd+gtm53+Iu2USA9n8Zzk1FeHXaGqomUExYfohLl/X+H1XH1twn8NM NpuUtmbDMJseMnwJ37/IAXIfTdkqAdhSE3Se6ElJIfWZj0Hi0jiYPlrWBY6gdhS9XKMv /SsEgLraze5ajD8eUju/qEOPaM/sbVXVvtuZT4QRh4jGdBhp+Gnie6duQ4ca8OiLWpLV iC1lz8GU6grG6j8NkmNNSrjHp8yI3dfxRIKesuoEgJFHY/lHPVE1sokcz1ZnzvwTv2Tt E3vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lLsIYPWotkAXrziYVSKNmTe49KZanAh+xSUn+rN5CVw=; b=UZVFQT3xJuayyLGlyxAAe81JXqTXum500pWS7OaqAA4RbZosvgZR7c8CUvlN2ODBwP jRb9U98uBeL97wWmGERwGXL9n8RB1fXM+hR+6vzjYx2Zgxqapn/ibMG1OKOPS24cgoUd ldtgWITcUaSrYl5Tz3Xnu+bZXFiHsHzU5M+6ccP/0MQY1AKYi7z+FBWvdgfv22Nz5faw bKJCT9S39SNWT6kuLmgElWmptB2enAziZ73+lBOgtJsmliHpxLctEwZzhdzRH+LEYw0c z2MmUjsXh9qXkSTXAVfHYqpPWGHp0lMhojJq21f6vR25/YhuQFmDc21PTbTpPlUdini9 ijCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x17si5925460ejw.375.2019.10.19.20.19.51; Sat, 19 Oct 2019 20:20:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726217AbfJTDRd (ORCPT + 99 others); Sat, 19 Oct 2019 23:17:33 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:64605 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbfJTDRd (ORCPT ); Sat, 19 Oct 2019 23:17:33 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id x9K3HGFR017485; Sun, 20 Oct 2019 05:17:16 +0200 Date: Sun, 20 Oct 2019 05:17:16 +0200 From: Willy Tarreau To: "Theodore Y. Ts'o" Cc: Vegard Nossum , Santiago Torres Arias , workflows@vger.kernel.org, Git Mailing List , LKML , Konstantin Ryabitsev , Eric Wong Subject: Re: email as a bona fide git transport Message-ID: <20191020031716.GA17475@1wt.eu> References: <20191016111009.GE13154@1wt.eu> <20191016144517.giwip4yuaxtcd64g@LykOS.localdomain> <56664222-6c29-09dc-ef78-7b380b113c4a@oracle.com> <20191018161547.GG21137@mit.edu> <20191018191456.GI21137@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191018191456.GI21137@mit.edu> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 18, 2019 at 03:14:56PM -0400, Theodore Y. Ts'o wrote: > On Fri, Oct 18, 2019 at 06:50:51PM +0200, Vegard Nossum wrote: > > The problem I ran into with putting the metadata at the end was > > detecting where the diff ends. A comment in 'git apply' suggested that > > detecting the difference between "--" as a diff/signature separator and > > as part of the diff is nontrivial in the sense that you need to actually > > do some parsing and keep track of hunk sizes. > > Could we cheat by having "git format-patch" add a "Diff-size" in the > header which gives the number of lines in the diff so git am can just > count lines to find the Trailer section? Be careful with this, it starts like this and ends up with non-editable patches. I'd rather have git-am use best-effort detection of the end. Also when dealing with stable backports, I've done a lot of "cat foo.diff >> bar.patch" to fixup some patches in which I just had to move some parts around. Having to count lines and edit a counter somewhere is going to become really painful. Just my two cents, Willy