Cherry Pick uses incorrect user name for commit
When trying to cherry pick a commit by "Jenkins Butler" into master, the commit was made with the user name "Jenkins", causing a pre-commit hook to fail:
Exit=1
remote: checking: "Jenkins" TheFriendlyButler@analog.com
remote: Incorrect user name: <Jenkins> instead of <Jenkins Butler>
Comments (10)
-
repo owner -
repo owner - changed status to open
-
reporter The hook only validates that the author and commiter are valid Bitbucket users. I use this plugin: https://marketplace.atlassian.com/plugins/com.tngtech.stash.plugins.verify-committers/server/overview by git show ouput looked just like yours. Thanks, -Michael
-
repo owner Do you happen know browser (including version) & OS of the person who clicked on the cherry-pick button?
-
reporter I'm on Chrome on Windows 7 x64
-
repo owner I don't think I've fixed it (since I cannot reproduce it yet), but version 2017.01.31 is a stab in the dark, and shouldn't hurt anything.
If 2017.01.31 does fix it, then i suspect Bit-Booster's "Squash" feature has similar issues, especially if "Jenkins Butler" is the selected author for the squash.
(2017.01.29 was sending author over the JSON call for cherry-pick even though it didn't need to. But for Squash it does need to!)
-
reporter Same error with the new version :(
-
repo owner Out of desperation I installed that hook. Reproduced the problem right away! I fetch the user's name via "commit.getAuthor().getName()" but that returns the username (e.g., gsylvie) if the user is in the user database, and it returns the raw "G. Sylvie Davies" metadata from the commit if the user is not in the user database. Fix is imminent. ETA 30 mins.
-
repo owner - changed status to resolved
2017.02.01 available in marketplace.
-
reporter Thanks!
- Log in to comment
Does the repo in question use .mailmap ?
Also, will your hook mind that "Commiter" will be set to whoever clicked the cherry-pick button, whereas "Author" will be preserved?
I'm having trouble reproducing this. If you could get me "git show" output with "--pretty" set to ""%H|an=%an|aN=%aN|ae=%ae|aE=%aE" against the commit-id you tried to cherry-pick, that would be very helpful.
E.g., for my attempt at reproducing this, here's what my "git show" returns: