git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Making GitGitGadget conversion lossless

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 26, 2020, 21:01 UTC
Message-ID
<xmqq5zfthxlw.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20200226200929.z4aej74ohbkgcdza@chatter.i7.local>
Konstantin Ryabitsev <konstantin@linuxfoundation.org> writes:
> - parent/tree hashes

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.

As I said already, I do not think that the desire to get the bit-for-bit identical commit is compatible with the idea to discuss e-mailed patches---the pieces of patch e-mail will become "you may look at them, you may apply them, but it is no use to comment on them to get them improved". So, I dunno.

Previous: Konstantin RyabitsevNext: Vegard Nossum
Message 2 of 5 in “Making GitGitGadget conversion lossless”
  1. Konstantin RyabitsevFeb 26, 2020
  2. Junio C HamanoFeb 26, 2020
  3. Vegard NossumFeb 26, 2020
  4. Konstantin RyabitsevFeb 26, 2020
  5. Junio C HamanoFeb 26, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.