mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-12 19:18:32 -05:00
Changes Repository History to Branch History
This commit is contained in:
@@ -273,7 +273,7 @@ export class BlameActiveLineController extends Disposable {
|
|||||||
this._statusBarItem.tooltip = 'Show File History';
|
this._statusBarItem.tooltip = 'Show File History';
|
||||||
break;
|
break;
|
||||||
case StatusBarCommand.ShowQuickFileHistory:
|
case StatusBarCommand.ShowQuickFileHistory:
|
||||||
this._statusBarItem.tooltip = 'Show Repository History';
|
this._statusBarItem.tooltip = 'Show Branch History';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export class CopyMessageToClipboardCommand extends ActiveEditorCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// If we don't have an editor then get the message of the last commit to the repository
|
// If we don't have an editor then get the message of the last commit to the branch
|
||||||
if (!uri) {
|
if (!uri) {
|
||||||
const log = await this.git.getLogForRepo(this.repoPath, undefined, 1);
|
const log = await this.git.getLogForRepo(this.repoPath, undefined, 1);
|
||||||
if (!log) return undefined;
|
if (!log) return undefined;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// If we don't have an editor then get the sha of the last commit to the repository
|
// If we don't have an editor then get the sha of the last commit to the branch
|
||||||
if (!uri) {
|
if (!uri) {
|
||||||
const log = await this.git.getLogForRepo(this.repoPath, undefined, 1);
|
const log = await this.git.getLogForRepo(this.repoPath, undefined, 1);
|
||||||
if (!log) return undefined;
|
if (!log) return undefined;
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ export class ShowQuickCommitDetailsCommand extends ActiveEditorCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!goBackCommand) {
|
if (!goBackCommand) {
|
||||||
// Create a command to get back to the repository history
|
// Create a command to get back to the branch history
|
||||||
goBackCommand = new CommandQuickPickItem({
|
goBackCommand = new CommandQuickPickItem({
|
||||||
label: `go back \u21A9`,
|
label: `go back \u21A9`,
|
||||||
description: `\u00a0 \u2014 \u00a0\u00a0 to repository history`
|
description: `\u00a0 \u2014 \u00a0\u00a0 to branch history`
|
||||||
}, Commands.ShowQuickRepoHistory, [new GitUri(commit.uri, commit)]);
|
}, Commands.ShowQuickRepoHistory, [new GitUri(commit.uri, commit)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ export class ShowQuickRepoHistoryCommand extends ActiveEditorCommand {
|
|||||||
return commands.executeCommand(Commands.ShowQuickCommitDetails, new GitUri(pick.commit.uri, pick.commit), pick.commit.sha, pick.commit,
|
return commands.executeCommand(Commands.ShowQuickCommitDetails, new GitUri(pick.commit.uri, pick.commit), pick.commit.sha, pick.commit,
|
||||||
new CommandQuickPickItem({
|
new CommandQuickPickItem({
|
||||||
label: `go back \u21A9`,
|
label: `go back \u21A9`,
|
||||||
description: `\u00a0 \u2014 \u00a0\u00a0 to repository history`
|
description: `\u00a0 \u2014 \u00a0\u00a0 to branch history`
|
||||||
}, Commands.ShowQuickRepoHistory, [uri, maxCount, goBackCommand, log]),
|
}, Commands.ShowQuickRepoHistory, [uri, maxCount, goBackCommand, log]),
|
||||||
log);
|
log);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
Logger.error('[GitLens.ShowQuickRepoHistoryCommand]', ex);
|
Logger.error('[GitLens.ShowQuickRepoHistoryCommand]', ex);
|
||||||
return window.showErrorMessage(`Unable to show repository history. See output channel for more details`);
|
return window.showErrorMessage(`Unable to show history. See output channel for more details`);
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
progressCancellation.dispose();
|
progressCancellation.dispose();
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ export class FileHistoryQuickPick {
|
|||||||
// Only show the full repo option if we are the root
|
// Only show the full repo option if we are the root
|
||||||
if (!goBackCommand) {
|
if (!goBackCommand) {
|
||||||
items.splice(index, 0, new CommandQuickPickItem({
|
items.splice(index, 0, new CommandQuickPickItem({
|
||||||
label: `$(repo) Show Repository History`,
|
label: `$(history) Show Branch History`,
|
||||||
description: `\u00a0 \u2014 \u00a0\u00a0 shows the repository commit history`
|
description: `\u00a0 \u2014 \u00a0\u00a0 shows the current branch history`
|
||||||
}, Commands.ShowQuickRepoHistory,
|
}, Commands.ShowQuickRepoHistory,
|
||||||
[
|
[
|
||||||
undefined,
|
undefined,
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class RepoHistoryQuickPick {
|
|||||||
const pick = await window.showQuickPick(items, {
|
const pick = await window.showQuickPick(items, {
|
||||||
matchOnDescription: true,
|
matchOnDescription: true,
|
||||||
matchOnDetail: true,
|
matchOnDetail: true,
|
||||||
placeHolder: 'Repository history \u2014 search by commit message, filename, or sha',
|
placeHolder: `Branch history \u2014 search by commit message, filename, or sha`,
|
||||||
ignoreFocusOut: getQuickPickIgnoreFocusOut()
|
ignoreFocusOut: getQuickPickIgnoreFocusOut()
|
||||||
// onDidSelectItem: (item: QuickPickItem) => {
|
// onDidSelectItem: (item: QuickPickItem) => {
|
||||||
// scope.setKeyCommand('right', item);
|
// scope.setKeyCommand('right', item);
|
||||||
|
|||||||
Reference in New Issue
Block a user