Skip to content

Commit 7f84f14

Browse files
committed
Improves action function naming across Git types
1 parent b923327 commit 7f84f14

21 files changed

+149
-262
lines changed

src/commands/git/log.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { GlyphChars, quickPickTitleMaxChars } from '../../constants';
22
import type { Container } from '../../container';
3-
import { showDetailsView } from '../../git/actions/commit';
3+
import { showCommitInDetailsView } from '../../git/actions/commit';
44
import { GitCommit } from '../../git/models/commit';
55
import type { GitLog } from '../../git/models/log';
66
import type { GitReference } from '../../git/models/reference';
@@ -192,10 +192,7 @@ export class LogGitCommand extends QuickCommand<State> {
192192

193193
let result: StepResult<ReturnType<typeof getSteps>>;
194194
if (state.openPickInView) {
195-
void showDetailsView(state.reference as GitCommit, {
196-
pin: false,
197-
preserveFocus: false,
198-
});
195+
void showCommitInDetailsView(state.reference as GitCommit, { pin: false, preserveFocus: false });
199196
result = StepResultBreak;
200197
} else {
201198
result = yield* getSteps(

src/commands/git/remote.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { QuickInputButtons } from 'vscode';
22
import type { Container } from '../../container';
3-
import { reveal } from '../../git/actions/remote';
3+
import { revealRemote } from '../../git/actions/remote';
44
import type { GitRemote } from '../../git/models/remote';
55
import { Repository } from '../../git/models/repository';
66
import { showGenericErrorMessage } from '../../messages';
@@ -334,10 +334,7 @@ export class RemoteGitCommand extends QuickCommand<State> {
334334
state.flags.includes('-f') ? { fetch: true } : undefined,
335335
);
336336
if (state.reveal !== false) {
337-
void reveal(remote, {
338-
focus: true,
339-
select: true,
340-
});
337+
void revealRemote(remote, { focus: true, select: true });
341338
}
342339
}
343340
}

src/commands/git/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ThemeIcon, window } from 'vscode';
33
import { GlyphChars } from '../../constants';
44
import type { SearchOperators, SearchOperatorsLongForm, SearchQuery } from '../../constants.search';
55
import type { Container } from '../../container';
6-
import { showDetailsView } from '../../git/actions/commit';
6+
import { showCommitInDetailsView } from '../../git/actions/commit';
77
import type { SearchCommitsResult } from '../../git/gitProvider';
88
import type { GitCommit } from '../../git/models/commit';
99
import type { Repository } from '../../git/models/repository';
@@ -272,7 +272,7 @@ export class SearchGitCommand extends QuickCommand<State> {
272272

273273
let result: StepResult<ReturnType<typeof getSteps>>;
274274
if (state.openPickInView) {
275-
void showDetailsView(context.commit, { pin: false, preserveFocus: false });
275+
void showCommitInDetailsView(context.commit, { pin: false, preserveFocus: false });
276276
result = StepResultBreak;
277277
} else {
278278
result = yield* getSteps(

src/commands/git/stash.ts

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { QuickInputButton, QuickPickItem, Uri } from 'vscode';
22
import { InputBoxValidationSeverity, QuickInputButtons, ThemeIcon, window } from 'vscode';
33
import { GlyphChars } from '../../constants';
44
import type { Container } from '../../container';
5-
import { reveal, showDetailsView } from '../../git/actions/stash';
5+
import { revealStash, showStashInDetailsView } from '../../git/actions/stash';
66
import { StashApplyError, StashApplyErrorReason, StashPushError, StashPushErrorReason } from '../../git/errors';
77
import type { GitStashCommit } from '../../git/models/commit';
88
import type { GitStashReference } from '../../git/models/reference';
@@ -408,15 +408,9 @@ export class StashGitCommand extends QuickCommand<State> {
408408
additionalButtons: [ShowDetailsViewQuickInputButton, RevealInSideBarQuickInputButton],
409409
onDidClickButton: (_quickpick, button) => {
410410
if (button === ShowDetailsViewQuickInputButton) {
411-
void showDetailsView(state.reference, {
412-
pin: false,
413-
preserveFocus: true,
414-
});
411+
void showStashInDetailsView(state.reference, { pin: false, preserveFocus: true });
415412
} else if (button === RevealInSideBarQuickInputButton) {
416-
void reveal(state.reference, {
417-
select: true,
418-
expand: true,
419-
});
413+
void revealStash(state.reference, { select: true, expand: true });
420414
}
421415
},
422416
},
@@ -860,15 +854,9 @@ export class StashGitCommand extends QuickCommand<State> {
860854
additionalButtons: [ShowDetailsViewQuickInputButton, RevealInSideBarQuickInputButton],
861855
onDidClickButton: (_quickpick, button) => {
862856
if (button === ShowDetailsViewQuickInputButton) {
863-
void showDetailsView(state.reference, {
864-
pin: false,
865-
preserveFocus: true,
866-
});
857+
void showStashInDetailsView(state.reference, { pin: false, preserveFocus: true });
867858
} else if (button === RevealInSideBarQuickInputButton) {
868-
void reveal(state.reference, {
869-
select: true,
870-
expand: true,
871-
});
859+
void revealStash(state.reference, { select: true, expand: true });
872860
}
873861
},
874862
},

src/commands/git/worktree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { proBadge, proBadgeSuperscript } from '../../constants';
55
import type { Container } from '../../container';
66
import { CancellationError } from '../../errors';
77
import { executeGitCommand } from '../../git/actions';
8-
import { convertLocationToOpenFlags, convertOpenFlagsToLocation, reveal } from '../../git/actions/worktree';
8+
import { convertLocationToOpenFlags, convertOpenFlagsToLocation, revealWorktree } from '../../git/actions/worktree';
99
import {
1010
ApplyPatchCommitError,
1111
ApplyPatchCommitErrorReason,
@@ -597,7 +597,7 @@ export class WorktreeGitCommand extends QuickCommand<State> {
597597
if (state.reveal !== false) {
598598
setTimeout(() => {
599599
if (this.container.views.worktrees.visible) {
600-
void reveal(worktree, { select: true, focus: false });
600+
void revealWorktree(worktree, { select: true, focus: false });
601601
}
602602
}, 100);
603603
}

src/commands/inspect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { TextEditor, Uri } from 'vscode';
22
import type { Container } from '../container';
3-
import { showDetailsView } from '../git/actions/commit';
3+
import { showCommitInDetailsView } from '../git/actions/commit';
44
import { GitUri } from '../git/gitUri';
55
import type { GitRevisionReference } from '../git/models/reference';
66
import { getReferenceFromRevision } from '../git/utils/-webview/reference.utils';
@@ -85,6 +85,6 @@ export class InspectCommand extends ActiveEditorCommand {
8585
}
8686
}
8787

88-
return showDetailsView(args.ref);
88+
return showCommitInDetailsView(args.ref);
8989
}
9090
}

0 commit comments

Comments
 (0)