Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1773702ybg; Sat, 19 Oct 2019 02:12:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNfCISmXtQvOobzQraxUkW3ItTrsIK0RxKzPLZqCi335T7v8mKCkGrYg3MYM//nvXaqHpj X-Received: by 2002:a05:6402:1351:: with SMTP id y17mr14145688edw.294.1571476372166; Sat, 19 Oct 2019 02:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571476372; cv=none; d=google.com; s=arc-20160816; b=gNC90Sx8eX8amqGNVMqxeCC+EChh8iMs50ug9N5RPcdTrdmqoOHL+A359hzHLlsv3g 5T4WO6mI097mzI6+Sj1fP5InF2evPsypnj2IWTfHoCldtVl9vJ7fKY0SxOAI+u4AZ8dp 8fESzYrasNukVAIvOnCaybWr6/phqbA2Y6CsPI9RppSEt+MBE5EgNxVKswkLUKhBMl+d I9xoQQpNOaGYIJYNqoSLQbVaKPiQzESC7OLf1BNnpNIKGEPDL9rI4ua5gvQTnMuRkwz2 1fxX2RaVwzl2AObU3/MnR1/CKaKb2VU+SejeTGeTcuKdPW6+MsQt3QqxpwZzvvl+Turm xrxA== 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=ddms44+hL0MApZlnXLHzoFnwD6z4+MhvNFsQ4DfMLrQ=; b=g3kLrXs8tnT0+JpupqqDagv768nVKsUjKI5dVAUFr2uYFqSkmdv1HTtGV/SEqDzdo/ cO3GXl2TfMDO1MKorCgCYyHjck6Uql1AHUNf3k7BE0sli3BYZcGV8f1id4+jdIo4LgF7 AoubOZpJfPzp9jAaK+P5SiNJlylMFkRkMjAKTNkUqWRYEWwoW3bzwBQu1GtvWw/Y1MwE HHkjeM/kWPJfJzNEvmX2U1RUHcbzmR86jGUZrfUYQVVogAAvx268JXI/y1wj0zKcs/QX lY7RnrJ+iaDI89PvqALQlz6hw+oVtgCZfGzYmvX+yN2gqGl06gijJolmmZiOrJ2c4AzG senA== 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 w24si5311317ejk.57.2019.10.19.02.12.28; Sat, 19 Oct 2019 02:12:52 -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 S2505941AbfJRTPd (ORCPT + 99 others); Fri, 18 Oct 2019 15:15:33 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:57928 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2394833AbfJRTPd (ORCPT ); Fri, 18 Oct 2019 15:15:33 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-98.corp.google.com [104.133.0.98] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x9IJEu32003509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Oct 2019 15:14:57 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 1F67B420458; Fri, 18 Oct 2019 15:14:56 -0400 (EDT) Date: Fri, 18 Oct 2019 15:14:56 -0400 From: "Theodore Y. Ts'o" To: Vegard Nossum Cc: Santiago Torres Arias , Willy Tarreau , workflows@vger.kernel.org, Git Mailing List , LKML , Konstantin Ryabitsev , Eric Wong Subject: Re: email as a bona fide git transport Message-ID: <20191018191456.GI21137@mit.edu> References: <20191016111009.GE13154@1wt.eu> <20191016144517.giwip4yuaxtcd64g@LykOS.localdomain> <56664222-6c29-09dc-ef78-7b380b113c4a@oracle.com> <20191018161547.GG21137@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 06:50:51PM +0200, Vegard Nossum wrote: > I started out using this approach, but I changed it because the > implementation was a bit annoying: 'git am' runs 'git mailsplit', > which just splits the email into two parts: > > 1) headers, changelog, and diffstat; > 2) diff and signature. > > One of my PoC patches changes mailsplit to split the extra metadata into > a third file. > > 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? Thanks, - Ted