Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit c5cd601

Browse files
committed
Only unset in local config
1 parent 8ed47ae commit c5cd601

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/controllers/git-tab-controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,13 @@ export default class GitTabController extends React.Component {
375375
const newUsername = this.usernameBuffer.getText();
376376
const newEmail = this.emailBuffer.getText();
377377

378-
if (newUsername.length > 0) {
378+
if (newUsername.length > 0 || options.global) {
379379
await this.props.repository.setConfig('user.name', newUsername, options);
380380
} else {
381381
await this.props.repository.unsetConfig('user.name');
382382
}
383383

384-
if (newEmail.length > 0) {
384+
if (newEmail.length > 0 || options.global) {
385385
await this.props.repository.setConfig('user.email', newEmail, options);
386386
} else {
387387
await this.props.repository.unsetConfig('user.email');

0 commit comments

Comments
 (0)