From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C841C4BA24 for ; Wed, 26 Feb 2020 22:27:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED59724670 for ; Wed, 26 Feb 2020 22:27:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="jgsq1bpK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727837AbgBZW1K (ORCPT ); Wed, 26 Feb 2020 17:27:10 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:57368 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727757AbgBZW1J (ORCPT ); Wed, 26 Feb 2020 17:27:09 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 5F93EB9B0C; Wed, 26 Feb 2020 17:27:09 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=L6I7OxWOFTp49lH7XxubfRcuou4=; b=jgsq1b pKavcVLO53qAbmfkNaW8SJ1L+YFVXfolcfwShvuRJNBr2x5E5JTBi2BlJUn/8R2s WjzFRXIHz7dXSO5q+FGCyPtvGzOzpzOE20Bk3K++iZkNFBqn3+6GJbQNpLn11eQf AS3j7PGh7Qa4Y9Ka0zUPqO74nXqm5k4j60f78= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=bxt6CRpgHV0zvKfvHR/UZTdrnuPWg4Kb /oe0RkZuffM5MUnyUpM9IbKWVxvrEGCQke6hqu/U65c8/iiENNkHyE4q0aK8nvWX ucPRSGZEw79ipy0SpeHB67HSwQRTQyufEn88LSaRD6P6rquWZWi7T+LyCrhFx9cf RGzpW7M8RnI= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 58CFAB9B0B; Wed, 26 Feb 2020 17:27:09 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.76.80.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 7E412B9B0A; Wed, 26 Feb 2020 17:27:06 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Konstantin Ryabitsev Cc: git@vger.kernel.org, vegard.nossum@oracle.com Subject: Re: Making GitGitGadget conversion lossless References: <20200226200929.z4aej74ohbkgcdza@chatter.i7.local> <20200226213515.t2aa4o4nquaaz6vg@chatter.i7.local> Date: Wed, 26 Feb 2020 14:27:04 -0800 In-Reply-To: <20200226213515.t2aa4o4nquaaz6vg@chatter.i7.local> (Konstantin Ryabitsev's message of "Wed, 26 Feb 2020 16:35:15 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 1EC80AD8-58E7-11EA-AFA5-8D86F504CC47-77302942!pb-smtp21.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Konstantin Ryabitsev writes: > On Wed, Feb 26, 2020 at 01:01:15PM -0800, Junio C Hamano wrote: >> Isn't this already available by recording the base-commit >> information? >> >> > - author/committer information >> > - cryptographic attestation (gpgsig) >> >> I think you are aiming to come up with bit-for-bit identical commit >> the sender had, and I would imagine that the easiest and least >> disruptive way to do so is to add a compressed and ascii-armored >> copy of "git cat-file commit" output of the original commit after >> the "---" line before the diff/diffstat of the e-mailed patch. The >> receiving end can then act on it when given some option by >> >> - first recover the contents of the commit object (call it #1); >> - learn the parent commit(s) and check out the tree; >> - apply the patch in the remainder of the patch e-mail to the tree; >> - make sure that the result of patch application gives the tree object >> recorded in #1; >> - run "hash-object -t commit -w" over #1 that gives you a commit >> object that is bit-for-bit identical. > > Right, I just don't want to be doing this in a separate tool. :) Yes, and I just outlined how it can be expressed in the "format-patch" output format, and implemented on the "am" side, as part of "git".