diff --git a/extensions/git/package.json b/extensions/git/package.json index c4a03271ec2..6c097dd2e60 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -987,6 +987,12 @@ "scope": "resource", "default": 10, "description": "%config.detectSubmodulesLimit%" + }, + "git.alwaysSignOff": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.alwaysSignOff%" } } }, diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 7f2c43dd233..8714430f2ed 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -71,6 +71,7 @@ "config.inputValidation": "Controls when to show commit message input validation.", "config.detectSubmodules": "Controls whether to automatically detect git submodules.", "config.detectSubmodulesLimit": "Controls the limit of git submodules detected.", + "config.alwaysSignOff": "Controls the signoff flag for all commits", "colors.modified": "Color for modified resources.", "colors.deleted": "Color for deleted resources.", "colors.untracked": "Color for untracked resources.", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index e37383c4932..043eec1269e 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1017,6 +1017,10 @@ export class CommandCenter { // enable signing of commits if configurated opts.signCommit = enableCommitSigning; + if (config.get('alwaysSignOff')) { + opts.signoff = true; + } + if ( // no changes (noStagedChanges && noUnstagedChanges)