projg2 / pram

PRam: simple bash tool to merge pull requests
GNU General Public License v2.0
9 stars 4 forks source link

De-duplicate lines started with 'Signed-off-by: ' #6

Open Flowdalic opened 2 years ago

Flowdalic commented 2 years ago

I often pram a PR where I I already signed off, so that the 'Closes' git trailer is added, but this causes duplicate Signed-off-by trailers, e.g.,

Closes: https://bugs.gentoo.org/853928
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/26069
Signed-off-by: Florian Schmaus <flow@gentoo.org>

I've looked a pram, but found no easy way to prevent this, as I found no way to have git tell me which value it will use for the Signed-off-by trailer (but I believe there must be a way).

thesamesam commented 2 years ago

It looks like we can do this via git-interpret-trailers (see also: https://stackoverflow.com/questions/58525836/git-magic-keywords-in-commit-messages-signed-off-by-co-authored-by-fixes).