Re: Round-tripping fast-export/import changes commit hashes
- From
anatoly techtonik <techtonik@gmail.com>
- Date
- Mar 1, 2021, 07:44 UTC
- Message-ID
- <CAPkN8xLE68d5Ngpy+LOQ8SALNgfB-+q4F3mFK-QBD=+EOKZSVg@mail.gmail.com>
- In-Reply-To
- <87mtvolbuj.fsf@evledraar.gmail.com>
On Sun, Feb 28, 2021 at 1:34 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 12 quoted lines
> > I think Elijah means that in the general case people are using fast > export/import to export/import between different systems or in > combination with a utility like git-filter-repo. > > In those cases users are also changing the content of the repository, so > the hashes will change, invalidating signatures. > > But there's also cases where e.g. you don't modify the history, or only > part of it, and could then preserve these headers. I think there's no > inherent reason not to do so, just that nobody's cared enough to submit > patches etc.
Is fast-export/import the only way to filter information in `git`? Maybe there is a slow json-export/import tool that gives a complete representation of all events in a repository? Or API that can be used to serialize and import that stream?
If no, then I'd like to take a look at where header filtering and serialization takes place. My C skills are at the "hello world" level, so I am not sure I can write a patch. But I can write the logic in Python and ask somebody to port that.
-- anatoly t.