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

Adds stashes into Commit view #3797

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Adds stashes into Commit view #3797

merged 1 commit into from
Dec 5, 2024

Conversation

eamodio
Copy link
Member

@eamodio eamodio commented Nov 26, 2024

I think this is ready for review/testing, as it works for any views that use "branch nodes", e.g. Commits, Branches, Worktrees, Repositories views.

We will need to figure out how to get it to work with the Commit Graph without having to refresh all the commits (and stashes) based on the selected "Branches Visibility"

@axosoft-ramint maybe instead of filtering the stash commits, we just also return a set of "reachable" commits, and then be able to pass both sets into the Graph or something.

We will need to handle the Commit Graph differently.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 13 changed files in this pull request and generated 1 suggestion.

Files not reviewed (8)
  • package.json: Language not supported
  • src/views/branchesView.ts: Evaluated as low risk
  • src/views/commitsView.ts: Evaluated as low risk
  • src/views/nodes/branchNode.ts: Evaluated as low risk
  • src/views/nodes/repositoryNode.ts: Evaluated as low risk
  • src/git/gitProviderService.ts: Evaluated as low risk
  • src/views/nodes/remoteNode.ts: Evaluated as low risk
  • src/views/nodes/branchesNode.ts: Evaluated as low risk

const data = await this.git.log(
repoPath,
{ configs: gitLogDefaultConfigsWithFiles, ref: options?.ref, stdin: options?.stdin },
{ configs: gitLogDefaultConfigsWithFiles, ref: ref, stdin: stdin },
Copy link
Preview

Copilot AI Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the 'stdin' variable is only included when it has valid content to avoid unexpected behavior. Suggestion: { configs: gitLogDefaultConfigsWithFiles, ref: ref, ...(stdin ? { stdin } : {}) }

Suggested change
{ configs: gitLogDefaultConfigsWithFiles, ref: ref, stdin: stdin },
{ configs: gitLogDefaultConfigsWithFiles, ref: ref, ...(stdin ? { stdin } : {}) }

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@eamodio eamodio force-pushed the feature/commits-show-stashes branch 2 times, most recently from 34cd987 to 103d555 Compare December 2, 2024 21:28
@eamodio eamodio marked this pull request as ready for review December 2, 2024 21:29
@eamodio eamodio changed the title (WIP) Adds stashes into Commit view Adds stashes into Commit view Dec 2, 2024
@eamodio eamodio marked this pull request as draft December 4, 2024 20:03
@eamodio eamodio force-pushed the feature/commits-show-stashes branch from 103d555 to ec140cb Compare December 5, 2024 17:35
@eamodio eamodio marked this pull request as ready for review December 5, 2024 17:35
@eamodio
Copy link
Member Author

eamodio commented Dec 5, 2024

The settings are all off by default, because there could be perf implications for large repos. So the risks here are super low.
I think this just need a quick glance.

Copy link
Contributor

@axosoft-ramint axosoft-ramint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok. Tiny nit before merging

package.json Outdated Show resolved Hide resolved
@eamodio eamodio force-pushed the feature/commits-show-stashes branch from ec140cb to 0a95e73 Compare December 5, 2024 19:30
@eamodio eamodio merged commit 5008179 into main Dec 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants