mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
show "Accept Merge" only for files currently under conflict. (#155822)
While the merge editor shows users can handle merge conflicts outside of it, e.g on the console via `git add <FILE>`. The merge editor should have this graceful and step one is to hide the "Accept Merge" command when the file isn't conflicting anymore * Adds a git-context key that contains all resource-uri-strings under conflict * Enable/placement of the Accept Merge command is driven by that * some merge editor context key sugar
This commit is contained in:
@@ -2028,6 +2028,9 @@ export class Repository implements Disposable {
|
||||
// set count badge
|
||||
this.setCountBadge();
|
||||
|
||||
// set mergeChanges context
|
||||
commands.executeCommand('setContext', 'git.mergeChanges', merge.map(item => item.resourceUri.toString()));
|
||||
|
||||
this._onDidChangeStatus.fire();
|
||||
|
||||
this._sourceControl.commitTemplate = await this.getInputTemplate();
|
||||
|
||||
Reference in New Issue
Block a user