|
|
@ -11,7 +11,7 @@ import { |
|
|
|
OpenFileAtRevisionCommandArgs, |
|
|
|
OpenFileOnRemoteCommandArgs, |
|
|
|
} from '../commands'; |
|
|
|
import { FileAnnotationType, ViewShowBranchComparison } from '../config'; |
|
|
|
import { configuration, FileAnnotationType, ViewShowBranchComparison } from '../configuration'; |
|
|
|
import { BuiltInCommands, CommandContext, setCommandContext } from '../constants'; |
|
|
|
import { Container } from '../container'; |
|
|
|
import { GitReference, GitRevision } from '../git/git'; |
|
|
@ -99,6 +99,17 @@ export class ViewCommands { |
|
|
|
commands.registerCommand('gitlens.views.loadMoreChildren', (node: PagerNode) => node.loadMore(), this); |
|
|
|
commands.registerCommand('gitlens.views.loadAllChildren', (node: PagerNode) => node.loadAll(), this); |
|
|
|
|
|
|
|
commands.registerCommand( |
|
|
|
'gitlens.views.setShowRelativeDateMarkersOn', |
|
|
|
() => this.setShowRelativeDateMarkers(true), |
|
|
|
this, |
|
|
|
); |
|
|
|
commands.registerCommand( |
|
|
|
'gitlens.views.setShowRelativeDateMarkersOff', |
|
|
|
() => this.setShowRelativeDateMarkers(false), |
|
|
|
this, |
|
|
|
); |
|
|
|
|
|
|
|
commands.registerCommand('gitlens.views.fetch', this.fetch, this); |
|
|
|
commands.registerCommand('gitlens.views.publishBranch', this.publishBranch, this); |
|
|
|
commands.registerCommand('gitlens.views.pull', this.pull, this); |
|
|
@ -490,6 +501,11 @@ export class ViewCommands { |
|
|
|
} |
|
|
|
|
|
|
|
@debug() |
|
|
|
private setShowRelativeDateMarkers(enabled: boolean) { |
|
|
|
return configuration.updateEffective('views', 'showRelativeDateMarkers', enabled); |
|
|
|
} |
|
|
|
|
|
|
|
@debug() |
|
|
|
private async stageFile(node: CommitFileNode | StatusFileNode) { |
|
|
|
if (!(node instanceof CommitFileNode) && !(node instanceof StatusFileNode)) return; |
|
|
|
|
|
|
|