|
|
@ -8,6 +8,7 @@ import type { CopyMessageToClipboardCommandArgs } from '../../../commands/copyMe |
|
|
|
import type { CopyShaToClipboardCommandArgs } from '../../../commands/copyShaToClipboard'; |
|
|
|
import type { OpenOnRemoteCommandArgs } from '../../../commands/openOnRemote'; |
|
|
|
import type { OpenPullRequestOnRemoteCommandArgs } from '../../../commands/openPullRequestOnRemote'; |
|
|
|
import type { CreatePatchCommandArgs } from '../../../commands/patches'; |
|
|
|
import type { ShowCommitsInViewCommandArgs } from '../../../commands/showCommitsInView'; |
|
|
|
import type { Config, GraphMinimapMarkersAdditionalTypes, GraphScrollMarkersAdditionalTypes } from '../../../config'; |
|
|
|
import type { StoredGraphFilters, StoredGraphIncludeOnlyRef, StoredGraphRefType } from '../../../constants'; |
|
|
@ -530,6 +531,7 @@ export class GraphWebviewProvider implements WebviewProvider |
|
|
|
this.host.registerWebviewCommand('gitlens.graph.copyDeepLinkToCommit', this.copyDeepLinkToCommit), |
|
|
|
this.host.registerWebviewCommand('gitlens.graph.copyDeepLinkToRepo', this.copyDeepLinkToRepo), |
|
|
|
this.host.registerWebviewCommand('gitlens.graph.copyDeepLinkToTag', this.copyDeepLinkToTag), |
|
|
|
this.host.registerWebviewCommand('gitlens.graph.shareAsCloudPatch', this.shareAsCloudPatch), |
|
|
|
|
|
|
|
this.host.registerWebviewCommand('gitlens.graph.openChangedFiles', this.openFiles), |
|
|
|
this.host.registerWebviewCommand('gitlens.graph.openOnlyChangedFiles', this.openOnlyChangedFiles), |
|
|
@ -2436,6 +2438,17 @@ export class GraphWebviewProvider implements WebviewProvider |
|
|
|
} |
|
|
|
|
|
|
|
@debug() |
|
|
|
private async shareAsCloudPatch(item?: GraphItemContext) { |
|
|
|
const ref = this.getGraphItemRef(item, 'revision') ?? this.getGraphItemRef(item, 'stash'); |
|
|
|
if (ref == null) return Promise.resolve(); |
|
|
|
|
|
|
|
return executeCommand<CreatePatchCommandArgs>(Commands.CreateCloudPatch, { |
|
|
|
ref1: ref.ref, |
|
|
|
repoPath: ref.repoPath, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@debug() |
|
|
|
private resetCommit(item?: GraphItemContext) { |
|
|
|
const ref = this.getGraphItemRef(item, 'revision'); |
|
|
|
if (ref == null) return Promise.resolve(); |
|
|
|