Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract stash explorer #94

Merged
merged 2 commits into from Jun 14, 2017

Conversation

@rebornix
Copy link
Contributor

rebornix commented Jun 14, 2017

Move stash explorer out of Gitlens explorer.


export * from './gitExplorerNodes';

export class GitStashExplorer implements TreeDataProvider<ExplorerNode> {

This comment has been minimized.

Copy link
@eamodio

eamodio Jun 14, 2017

Owner

Let's just call it StashExplorer -- I know my naming has git everywhere, but I'm going to try to move away from it eventually ;)

This comment has been minimized.

Copy link
@rebornix

rebornix Jun 14, 2017

Author Contributor

Addressed.

? new GitUri(editor.document.uri, { repoPath: git.repoPath, fileName: editor.document.uri.fsPath })
: new GitUri(Uri.file(git.repoPath), { repoPath: git.repoPath, fileName: git.repoPath });

this._node = new StashNode(uri, this.context, this.git);

This comment has been minimized.

Copy link
@eamodio

eamodio Jun 14, 2017

Owner

What do you think of keeping this in a node or just nuking the node and dropping the logic in the explorer? I keep going back and forth -- eh keeping it in the node is nice for possible reuse later in another view or whatnot

This comment has been minimized.

Copy link
@rebornix

rebornix Jun 14, 2017

Author Contributor

The first time I saw the code, I found that it's not intuitive enough. For example, let's say we have this Stash Explorer, the tree node can only be StashNode or FileChangeNode so a union type StashNode | FileChangeNode is good enough. That's also how I implemented it.

But for your case, if the hierarchy can be more than 2, your solution is definitely smarter. The leaf node is always FileChangeNode in Commits, Stashes, Pull Request so I'll say let's go with this way, putting things into the node and reuse them with ease.

@eamodio eamodio force-pushed the eamodio:feature-explorer branch from eae909f to f61afe5 Jun 14, 2017
@rebornix rebornix force-pushed the rebornix:ExtractStashExplorer branch from 6429d27 to 65dc12f Jun 14, 2017
@eamodio eamodio merged commit 57874ed into eamodio:feature-explorer Jun 14, 2017
billsedison added a commit to noside911/vscode-gitlens that referenced this pull request Jan 4, 2019
Commits can be searched by short or full hashes
billsedison added a commit to noside911/vscode-gitlens that referenced this pull request Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.