Re: Making GitGitGadget conversion lossless

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux