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

feat: improve git state handling and file watching #331

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

aculich
Copy link

@aculich aculich commented Feb 16, 2025

Enhance edamagit status buffer to automatically update when git state changes occur outside of edamagit (e.g., via command line or VS Code source control). This improves the user experience by keeping the status display in sync with the actual repository state.

Key Features:

  • Intelligent State Tracking:

    • Monitors meaningful changes in git repository state

    • Tracks working tree, index, and merge change counts

    • Updates only when status actually changes

    • Prevents unnecessary refreshes while ensuring accuracy

  • Selective File Watching:

    • Filters temporary and lock files

    • Carefully handles git internal files

    • Catches important changes (HEAD, refs) while ignoring routine ones

    • Prevents update loops from status refresh operations

  • Safe Update Management:

    • Skips updates during rebase operations

    • Safely handles merge states with lock file checks

    • Protects git config access during updates

    • Gracefully handles concurrent operations

  • Smart Debouncing:

    • Clusters rapid changes to prevent overwhelming updates

    • Maintains minimum interval between updates

    • Cancels pending updates when new changes arrive

    • Uses efficient timeout and timestamp tracking

Enhance edamagit status buffer to automatically update when git state changes occur outside of edamagit (e.g., via command line or VS Code source control). This improves the user experience by keeping the status display in sync with the actual repository state.

Key Features:

- Intelligent State Tracking:

  * Monitors meaningful changes in git repository state

  * Tracks working tree, index, and merge change counts

  * Updates only when status actually changes

  * Prevents unnecessary refreshes while ensuring accuracy

- Selective File Watching:

  * Filters temporary and lock files

  * Carefully handles git internal files

  * Catches important changes (HEAD, refs) while ignoring routine ones

  * Prevents update loops from status refresh operations

- Safe Update Management:

  * Skips updates during rebase operations

  * Safely handles merge states with lock file checks

  * Protects git config access during updates

  * Gracefully handles concurrent operations

- Smart Debouncing:

  * Clusters rapid changes to prevent overwhelming updates

  * Maintains minimum interval between updates

  * Cancels pending updates when new changes arrive

  * Uses efficient timeout and timestamp tracking
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