Skip to content

Commit

Permalink
Adds reset avatar cache command
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Mar 1, 2021
1 parent 86e9a26 commit dab25a3
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- _Toggles the file changes from the commit_
- Adds _Publish Repository_ command (`gitlens.publishRepository`) to publish the repository to a remote provider
- Adds supported remote types in README — thanks to [PR #1371](https://github.com/eamodio/vscode-gitlens/pull/1371) by Vladislav Guleaev ([@vguleaev](https://github.com/vguleaev))
- Adds a new _Reset Avatar Cache_ command (`gitlens.resetAvatarCache`) to clear the avatar cache

### Changed

Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"onCommand:gitlens.stashSaveFiles",
"onCommand:gitlens.externalDiff",
"onCommand:gitlens.externalDiffAll",
"onCommand:gitlens.resetAvatarCache",
"onCommand:gitlens.resetSuppressedWarnings",
"onCommand:gitlens.inviteToLiveShare",
"onCommand:gitlens.browseRepoAtRevision",
Expand Down Expand Up @@ -3747,6 +3748,11 @@
"title": "Open All Changes (difftool)",
"category": "GitLens"
},
{
"command": "gitlens.resetAvatarCache",
"title": "Reset Avatar Cache",
"category": "GitLens"
},
{
"command": "gitlens.resetSuppressedWarnings",
"title": "Reset Suppressed Warnings",
Expand Down Expand Up @@ -5470,6 +5476,10 @@
"command": "gitlens.stashSaveFiles",
"when": "false"
},
{
"command": "gitlens.resetAvatarCache",
"when": "gitlens:enabled"
},
{
"command": "gitlens.resetSuppressedWarnings",
"when": "gitlens:enabled"
Expand Down
1 change: 1 addition & 0 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export * from './commands/rebaseEditor';
export * from './commands/refreshHover';
export * from './commands/remoteProviders';
export * from './commands/repositories';
export * from './commands/resetAvatarCache';
export * from './commands/resetSuppressedWarnings';
export * from './commands/setViewsLayout';
export * from './commands/searchCommits';
Expand Down
1 change: 1 addition & 0 deletions src/commands/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export enum Commands {
GitCommands = 'gitlens.gitCommands',
QuickOpenFileHistory = 'gitlens.quickOpenFileHistory',
RefreshHover = 'gitlens.refreshHover',
ResetAvatarCache = 'gitlens.resetAvatarCache',
ResetSuppressedWarnings = 'gitlens.resetSuppressedWarnings',
RevealCommitInView = 'gitlens.revealCommitInView',
SearchCommits = 'gitlens.showCommitSearch',
Expand Down
14 changes: 14 additions & 0 deletions src/commands/resetAvatarCache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';
import { resetAvatarCache } from '../avatars';
import { command, Command, Commands } from './common';

@command()
export class ResetAvatarCacheCommand extends Command {
constructor() {
super(Commands.ResetAvatarCache);
}

execute() {
resetAvatarCache('all');
}
}

0 comments on commit dab25a3

Please sign in to comment.