fast-import: start controlling how commit signatures are handled
Tools like git-filter-repo
should be able to control how commit signatures are handled when regenerating repository content after it
has been filtered (see https://github.com/newren/git-filter-repo/issues/139). For this purpose, they need a way for git fast-import
to control how commit signatures are handled.
This small patch series starts to implement such a way by adding a new --signed-commits=<mode>
option to git fast-import
.
For now this new option behaves in a very similar way as the option with the same name that already exists in git fast-export
. Especially it supports exactly the same s and the same aliases for these modes. For example "ignore" is a synonym for "verbatim".
In the future I want to implement new s like "strip-if-invalid", "re-sign", "re-sign-if-invalid" that might be a bit more complex for this option. But for now I prefer to start with the simple modes to validate the general design of the new option.
In particular, I am interested in feedback about the following:
-
Should we keep "ignore" as a synonym for "verbatim" and "warn" as a synonym for "warn-verbatim"? My opinion is that they might be confusing, so we might want to remove them for
git fast-import
even if we keep them forgit fast-export
. The parsing code might be a bit more complex if we do that though, so for now I have kept the synonyms. -
Are we still fine with most s having a "warn-*" variant (like the "warn-strip" variant of "strip" for example)? Or should we have a separate
--verbose
or maybe--signed-commits-verbose
option dedicated to switching warnings on/off? I think it's good to decide about this before the number of s increases a lot with new s like "strip-if-invalid", "re-sign", "re-sign-if-invalid" and possibly others.
This is related to #519