Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: git@vger.kernel.org, vegard.nossum@oracle.com
Subject: Re: Making GitGitGadget conversion lossless
Date: Wed, 26 Feb 2020 14:27:04 -0800	[thread overview]
Message-ID: <xmqqo8tlgf2f.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20200226213515.t2aa4o4nquaaz6vg@chatter.i7.local> (Konstantin Ryabitsev's message of "Wed, 26 Feb 2020 16:35:15 -0500")

Konstantin Ryabitsev <konstantin@linuxfoundation.org> 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".

      reply	other threads:[~2020-02-26 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 20:09 Making GitGitGadget conversion lossless Konstantin Ryabitsev
2020-02-26 21:01 ` Junio C Hamano
2020-02-26 21:32   ` Vegard Nossum
2020-02-26 21:35   ` Konstantin Ryabitsev
2020-02-26 22:27     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo8tlgf2f.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox