From: Elijah Newren <newren@gmail.com>
To: anatoly techtonik <techtonik@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Round-tripping fast-export/import changes commit hashes
Date: Sat, 27 Feb 2021 09:48:56 -0800 [thread overview]
Message-ID: <CABPp-BGDB6jj+Et44D6D22KXprB89dNpyS_AAu3E8vOCtVaW1A@mail.gmail.com> (raw)
In-Reply-To: <CAPkN8xK7JnhatkdurEb16bC0wb+=Khd=xJ51YQUXmf2H23YCGw@mail.gmail.com>
Hi,
On Sat, Feb 27, 2021 at 4:37 AM anatoly techtonik <techtonik@gmail.com> wrote:
>
> Hi.
>
> I can't get the same commit hashes after fast-export and then fast-import of
> this repository without any edits https://github.com/simons-public/protonfixes
> I have no idea what causes this, and how to prevent it from happening. Are
> there any workarounds?
Your second commit is signed. Fast-export strips any extended headers
on commits, such as GPG signatures, because there's no way to keep
them in general. In the special case that you aren't making *any*
changes to the repository and will import it as-is, you could
theoretically keep the signatures, but you don't need fast-export in
such a case so no one ever bothered to implement commit signature
handling in fast-export and fast-import. If you make any changes
whatsoever to the commits before the signature (including importing
them to a different system), then the signature would be invalid.
You probably don't want to hear this, but there are no workarounds.
There are also other things that will prevent a simple fast-export |
fast-import pipeline from preserving your history as-is besides signed
commits (most of these are noted in the "Inherited Limitations"
section over at
https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html):
* any other form of extended header; fast-export only looks for the
headers it knows and exports those
* grafts and replace objects will just get rewritten (and if they
cause any cycles, those cycles and anything depending on them are
dropped)
* commits without an author will be given one matching the committer
(hopefully you don't have these, but if you do...)
* tags that are missing a tagger are also a problem (hopefully you
don't have these, but if you do...)
* annotated or signed tags outside the refs/tags/ namespace will get
renamed weirdly
* commits by default are re-encoded into UTF-8, though I notice you
did pass --reencode=no to handle this
Hope that at least explains things for you, even if it doesn't give
you a workaround or a solution.
next prev parent reply other threads:[~2021-02-27 17:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-27 12:31 Round-tripping fast-export/import changes commit hashes anatoly techtonik
2021-02-27 17:48 ` Elijah Newren [this message]
2021-02-28 10:00 ` anatoly techtonik
2021-02-28 10:34 ` Ævar Arnfjörð Bjarmason
2021-03-01 7:44 ` anatoly techtonik
2021-03-01 17:34 ` Junio C Hamano
2021-03-02 21:52 ` anatoly techtonik
2021-03-03 7:13 ` Johannes Sixt
2021-03-04 0:55 ` Junio C Hamano
2021-08-09 15:45 ` anatoly techtonik
2021-08-09 18:15 ` Elijah Newren
2021-08-10 15:51 ` anatoly techtonik
2021-08-10 17:57 ` Elijah Newren
2022-12-11 18:30 ` anatoly techtonik
2023-01-13 7:21 ` Elijah Newren
2021-03-01 18:06 ` Elijah Newren
2021-03-01 20:04 ` Ævar Arnfjörð Bjarmason
2021-03-01 20:17 ` Elijah Newren
2021-03-02 22:12 ` anatoly techtonik
2021-03-01 20:02 ` Ævar Arnfjörð Bjarmason
2021-03-02 22:23 ` anatoly techtonik
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABPp-BGDB6jj+Et44D6D22KXprB89dNpyS_AAu3E8vOCtVaW1A@mail.gmail.com \
--to=newren@gmail.com \
--cc=git@vger.kernel.org \
--cc=techtonik@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).