sublime_merge
sublime_merge copied to clipboard
Overridden username and email are not used when editing a commit message
Version info
- OS: Windows 10 19044.3086
- Build: 2092
Description
When a username and an email are overridden with includeIf in Git config, editing a commit message applies the non-overridden username and email to the commit.
User directory .gitconfig:
[user]
name = foo
email = [email protected]
[includeIf "gitdir:C:/Work"]
path = "C:/Work/.gitconfig"
C:/Work/.gitconfig:
[user]
name = bar
email = [email protected]
Steps to reproduce
Steps to reproduce the behavior:
- Override the username and the email as described above.
- For a repository in C:/Work, edit the message of a commit: right-click a commit, select Edit Commit, select Edit Commit Message, edit the message and select Save.
- Notice that the author (or committer) of the commit changes to foo <[email protected]>.
Expected behavior
After editing the message, the commit author (or committer) should be bar <[email protected]>.
Debug Information
Notes
When perfoming a normal commit, Sublime Merge incorrectly displays the non-overridden username and email below the commit message edit box, but upon commit correctly applies the overridden username and email to the commit.
Also just noticed this, quite unexpected and annoying to see it happened when discovering it much later in your repo.
see also: #1314