Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.67.0 OS Version: Windows 10 Steps to Reproduce: .rebaseWhenSync true .postCommitCommand sync git.rebaseWhenSync true works on actionbutton and statusbar but it does not affect git.postCommitCommand sync

Discussion:
const behind = this.state.HEAD.behind ? ` ${this.state.HEAD.behind}$(arrow-down)` : ''; const icon = this.state.isSyncInProgress ? '$(sync~spin)' : '$(sync)'; <del> const rebaseWhenSync = config.get<string>('rebaseWhenSync'); </del> return { command: { <del> command: rebaseWhenSync ? 'git.syncRebase' : 'git.sync', </del> <ins> command: 'git.sync', </ins> title: `${icon}${behind}${ahead}`, tooltip: this.state.isSyncInProgress ? localize('syncing changes', "Synchronizing Changes...")

} } <del> if (rebase) { await repository.syncRebase(HEAD); } else { await repository.sync(HEAD); } </del> <ins> await repository.sync(HEAD, rebase); </ins> } @command('git.sync', { repository: true }) async sync(repository: Repository): Promise<void> { <ins> const config = workspace.getConfiguration('git', Uri.file(repository.root)); const rebase = config.get<boolean>('rebaseWhenSync', false) === true; </ins> try { <del> await this._sync(repository, false); </del> <ins> await this._sync(repository, rebase); </ins> } catch (err) { if (/Cancelled/i.test(err && (err.message || err.stderr || ''))) { return;

@command('git._syncAll') async syncAll(): Promise<void> { await Promise.all(this.model.repositories.map(async repository => { <ins> const config = workspace.getConfiguration('git', Uri.file(repository.root)); const rebase = config.get<boolean>('rebaseWhenSync', false) === true; </ins> const HEAD = repository.HEAD; if (!HEAD || !HEAD.upstream) { return; } <del> await repository.sync(HEAD); </del> <ins> await repository.sync(HEAD, rebase); </ins> })); }

|| e.affectsConfiguration('git.untrackedChanges', root) || e.affectsConfiguration('git.ignoreSubmodules', root) || e.affectsConfiguration('git.openDiffOnClick', root) <del> || e.affectsConfiguration('git.rebaseWhenSync', root) </del> || e.affectsConfiguration('git.showActionButton', root) )(this.updateModelState, this, this.disposables);

} @throttle <del> sync(head: Branch): Promise<void> { return this._sync(head, false); } @throttle async syncRebase(head: Branch): Promise<void> { return this._sync(head, true); </del> <ins> sync(head: Branch, rebase: boolean): Promise<void> { return this._sync(head, rebase); </ins> } private async _sync(head: Branch, rebase: boolean): Promise<void> {

text += this.repository.syncLabel; } <del> const config = workspace.getConfiguration('git', Uri.file(this.repository.root)); const rebaseWhenSync = config.get<string>('rebaseWhenSync'); command = rebaseWhenSync ? 'git.syncRebase' : 'git.sync'; </del> <ins> command = 'git.sync'; </ins> tooltip = this.repository.syncTooltip; } else { icon = '$(cloud-upload)';