README: add a note about broken hg-git compatibility mode

This commit is contained in:
Mark Nauwelaerts
2025-05-02 16:05:06 +02:00
parent fbeaffb15c
commit c13e36f215

View File

@@ -71,6 +71,20 @@ the same commits:
% git config --global remote-hg.hg-git-compat true
--------------------------------------
****
mnauw's note; The above is not quite the case, it only ever has been (somewhat) if
an undocumented debug mode was enabled in `hg-git` (`debugextrainmessage` setting),
and in recent versions the latter is no longer considered. In fact, `hg-git` creates
git commits with additional hg metadata stored in so-called "extra commit headers".
The latter might be seen by `git log --format=raw` or `git cat-file -p <commitid>`,
but are otherwise mostly used internally by the git suite (for signatures). However,
there is limited to no support for those in git "porcelain or plumbing" commands.
In particular, `git fast-export` and `git fast-import` do not consider these,
so a `gitremote-helpers` tool is then also out of luck. Incidentally, it also
follows that a `git fast-export | git fast-import` "clone" approach would also
lose such extra metadata, and likewise so for e.g. `git filter-repo`.
****
== Notes ==
Remember to run `git gc --aggressive` after cloning a repository, especially if