Skip to content

Conversation

@everpcpc
Copy link
Member

Summary

This PR optimizes git remote information handling by caching repository metadata in the session instead of repeatedly executing git commands.

Changes:

  • Cache git remote info (owner/repo, fork status, origin owner/repo, current branch) in session state
  • Initialize git cache when session loads
  • Refactor push/update prompts in MainLayout to use cached data instead of instructing repeated git remote -v and URL parsing
  • Add IPC handler for sessions:init-git-cache

Benefits:

  • Reduces redundant git command executions
  • Improves performance for git operations
  • Simplifies prompt instructions by removing repetitive git remote parsing logic

Tests

  • No Test - Refactoring existing functionality, behavior unchanged

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

@everpcpc everpcpc marked this pull request as ready for review January 19, 2026 16:18
@everpcpc everpcpc merged commit 8f69d07 into databendlabs:main Jan 19, 2026
3 checks passed
@everpcpc everpcpc deleted the lisbon-w3ctkqfz branch January 19, 2026 16:18
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.

1 participant