RFR: SKARA-1362: PR suggestion for fixing username is wrong
Kevin Rushforth
kcr at openjdk.java.net
Tue Feb 22 20:04:05 UTC 2022
On Tue, 22 Feb 2022 19:52:20 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
> The Skara PR bot warns when the Author name in the git commit doesn't match the preferred name in the GitHub profile. The recommended fix that the bot adds as a PR comment is wrong.
>
> This PR fixes the message.
As noted in the JBS issue, the Skara PR bot warns about the mismatch and suggests pushing a new commit to correct it, using the following commands:
$ git checkout BRANCHNAME
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push
The `git commit` command is wrong and produces an error:
fatal: Option -m cannot be combined with -c/-C/-F.
Removing the '-m' option makes it succeed, but does so by amending the existing commit (thus requiring a force-push), rather than by adding a new one.
This PR proposes using a command that works, and adds a new commit:
$ git commit --author='Preferred Full Name <you at example.com>' --allow-empty -m 'Update full name'
-------------
PR: https://git.openjdk.java.net/skara/pull/1290
More information about the skara-dev
mailing list