Cherry Pick uses incorrect user name for commit

Issue #23 resolved
Michael Fowler created an issue

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)

  1. Julius Davies [bit-booster.com] repo owner

    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:

    git show -s --pretty="%H|an=%an|aN=%aN|ae=%ae|aE=%aE"     8858159686a6128cf31ef664fe740a49bcc7d694
    
    8858159686a6128cf31ef664fe740a49bcc7d694|an=Jenkins Butler|aN=Jenkins Butler|ae=TheFriendlyButler@analog.com|aE=TheFriendlyButler@analog.com
    
  2. Julius Davies [bit-booster.com] repo owner

    Do you happen know browser (including version) & OS of the person who clicked on the cherry-pick button?

  3. Julius Davies [bit-booster.com] 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!)

  4. Julius Davies [bit-booster.com] 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.

  5. Log in to comment