Skip to content

Git overhaul#24

Open
TimRl wants to merge 54 commits intomainfrom
git-overhaul
Open

Git overhaul#24
TimRl wants to merge 54 commits intomainfrom
git-overhaul

Conversation

@TimRl
Copy link
Copy Markdown
Collaborator

@TimRl TimRl commented Mar 30, 2026

No description provided.

TimRl added 30 commits February 25, 2026 10:47
…ing performance and reliability.

- Implemented a new gitBinaryManager to handle the downloading and management of the dugite-native Git binary.
- Updated GitService to utilize dugiteGit for various Git commands, including status, fetch, and push operations.
- Introduced an askpass script for credential management during Git operations.
- Removed dependencies on @fetsorn/isogit-lfs, replacing LFS pointer utilities with native implementations.
- Adjusted package.json and package-lock.json to reflect the new dependencies and versions.
- Introduced a new 'blocked' property in the sync response to indicate when synchronization is prevented by pre-conditions, such as outdated extensions.
- Updated the logic in SCMManager to return the 'blocked' status when sync cannot proceed, enhancing error handling and user feedback.
…t/config

- Added configuration flags to disable git-lfs filters during git operations, ensuring compatibility with dugite's bundled Git binary.
- Updated gitExec to include LFS override flags in every invocation.
- Enhanced disableLfsFilters to persist LFS filter settings in the repository's configuration for external tool compatibility.
- Updated parseGitProgress to capture additional transfer information from progress output, allowing for more detailed status updates.
- Modified uploadBlobsToLFSBucket to include a callback for file upload status, providing insights on whether files are already on the server and their sizes.
- Improved user-friendly descriptions for sync progress updates, ensuring clearer communication of upload and download phases.
…ation deadlocks

- Updated getExtensionVersionsViaCommand and updateExtensionVersionsViaCommand to avoid forcing activation of the codex-editor extension, returning appropriate error messages instead.
- Improved comments for clarity on the activation logic and potential deadlock scenarios.
- Enhanced the Git binary initialization to allow users to manually retry downloading the Git runtime if automatic attempts fail.
- Introduced a reset mechanism for cached paths to ensure fresh attempts during retries.
- Updated the ensureGitBinary function to include retry logic with exponential backoff for downloading the Git binary, improving robustness against transient network issues.
- Improved error handling and user feedback during the Git binary setup process.
- Introduced isGitBinaryAvailable method to check the presence of the Git binary.
- Implemented retryGitBinaryDownload method to allow users to retry downloading the Git binary after a failure.
- Updated user feedback messages to clarify the offline mode and retry options during Git binary initialization.
- Enhanced error handling for retry attempts, improving overall robustness of the Git setup process.
- Added event emissions for sync progress, start, and completion in SCMManager to provide real-time feedback during the publishing process.
- Improved error handling by emitting error messages when conflicts occur or when publishing fails.
- Refactored StateManager to ensure thread safety when accessing the lock file, preventing potential race conditions during async operations.
- Enhanced the getExtensionVersionsViaCommand function to prefer reading from the codex-editor command while adding a fallback to read metadata.json directly from disk if the command is unavailable.
- Introduced readVersionsFromDisk function to handle direct file reading, including error handling for missing or empty metadata.json.
- Updated comments for clarity on the reading strategy and the "single writer" principle governing writes.
- Improved handling of metadata updates by changing error logging from error to warning level, allowing for non-blocking failures during sync.
- Updated the return value for metadataUpdated to reflect the actual update status, enhancing clarity in sync conditions.
- Added comments for better understanding of the update process and its implications on synchronization.
…ecker

- Removed the updateExtensionVersionsViaCommand function to streamline version handling, as it was deemed unnecessary for the current logic.
- Updated logging messages to enhance clarity, changing error logs to warnings where appropriate, and improving the overall readability of the output.
- Adjusted comments to better reflect the current functionality and intentions of the version checking process.
- Implemented a check to block publishing if installed extensions are outdated compared to the requirements in metadata.json.
- Added error handling to inform users to update their extensions before proceeding with the publish operation.
- Enhanced logging to provide clear feedback on the publishing process and version requirements.
…ile fetching

- Enhanced error handling to provide specific debug messages when a repository file is not found, improving clarity during troubleshooting.
- Maintained existing error logging for other types of errors, ensuring comprehensive feedback on fetch failures.
…cation

- Added handling for sync lock scenarios to prevent concurrent publish operations, providing clear error messages to users.
- Implemented post-push verification to ensure that local changes are accurately reflected on the remote repository, enhancing reliability during the publish process.
- Improved logging for verification failures, allowing for better troubleshooting while maintaining non-fatal warnings for non-critical issues.
…executions

- Introduced an in-memory flag to track sync progress, preventing multiple simultaneous sync calls.
- Enhanced user feedback by emitting a message when a sync attempt is skipped due to an ongoing operation.
- Refactored the sync method to ensure proper handling of the sync state during execution.
…ndling

- Added platform-specific askpass wrapper creation for Windows and Unix systems to ensure proper execution of the askpass script.
- Introduced HTTP timeout flags to prevent long hangs during network operations, providing quicker failure responses.
- Updated GitService to log network diagnostics with optional remote URL context, improving troubleshooting capabilities.
- Enhanced error handling in fetch and push operations to provide more informative feedback on failures.
- Enhanced logging for the creation of platform-specific askpass wrappers, providing clearer feedback on success and failure scenarios.
- Removed unnecessary environment variable to prevent potential conflicts with system-level git configurations.
…ompatibility

- Updated the stdout and stderr functions to replace CRLF line endings with LF, enhancing compatibility across different platforms.
- Added documentation to clarify the normalization process and its importance for downstream parsers.
- Added logic to set the GIT_SSL_CAINFO environment variable on Linux, pointing to the ssl/cacert.pem file in the local Git directory to prevent certificate errors during HTTPS operations.
- Included logging to indicate the presence of the SSL CA bundle or warn if it is missing, improving feedback for users on potential HTTPS issues.
- Updated the askpass wrapper to use the absolute path of the Node binary, ensuring compatibility across different environments.
- Introduced a baseline set of environment variables to enforce non-interactive Git operations, preventing terminal prompts and GUI dialogs.
- Improved credential handling by overriding the credential helper configuration to avoid conflicts with system-level settings.
- Refactored status matrix parsing for clarity and accuracy in file path extraction during Git status checks.
- Updated GitOperationError to use a dedicated stderr function for improved clarity in error messages.
- Ensured consistent application of credential override flags in fastForward and clone functions, enhancing credential handling during Git operations.
- Introduced PLATFORM_SAFETY_FLAGS to normalize Git behavior across Windows, macOS, and Linux, addressing issues with long paths, line endings, and filesystem monitoring.
- Updated NON_INTERACTIVE_ENV to include GIT_CONFIG_NOSYSTEM, preventing interference from system-level Git configurations.
- Refactored gitExec to apply new platform safety flags alongside existing LFS overrides.
- Improved status matrix parsing to accurately handle file paths with spaces.
- Added functionality to automatically remove stale index.lock files if they are older than a specified threshold, improving user experience by preventing operation failures due to leftover lock files.
- Updated gitExec to retry operations after removing stale locks, ensuring smoother Git interactions.
- Enhanced documentation for platform safety flags and their implications on Git operations.
…overy

- Updated the withTimeout method to support aborting Git operations on timeout using AbortController, preventing indefinite hangs.
- Introduced automatic retry logic for push operations on non-fast-forward errors, enhancing user experience during push failures.
- Improved error handling to provide more informative messages based on specific failure scenarios during push operations.
- Refactored push operation logging for better clarity and progress tracking.
- Added concurrency control to the GitHub Actions workflow to manage test runs more efficiently.
- Updated permissions for the workflow to ensure proper access to repository contents.
- Simplified the checkout process by using actions/checkout@v4 and actions/setup-node@v4 for Node.js setup.
- Introduced new functions in dugiteGit to use the embedded Git binary and manage Git references, improving test environment stability.
- Refactored tests to utilize the new dugiteGit functions for updating refs and checking out branches, enhancing code clarity and maintainability.
… formatting

- Added support for the safe.directory configuration to prevent ownership issues on shared systems, enhancing usability for non-developer users.
- Updated the log function to use NUL as a record separator, improving collision resistance in commit message parsing.
- Refactored the makeExecutable function to ensure all binaries, including symbolic links, are made executable, enhancing compatibility on Unix systems.
- Updated .vscodeignore to ignore all files by default, whitelisting only necessary files for the VSIX package, preventing stray files from being included.
- Improved SSL handling in dugiteGit by ensuring the GIT_SSL_CAINFO is set correctly for Linux, enhancing HTTPS operation reliability.
- Added a new function to detect the remote's default branch after a fetch, improving branch management during clone operations.
- Enhanced error handling and logging for Git operations, ensuring better feedback and reliability in various scenarios.
…andling and abort support

- Added support for AbortController in fastForward to allow operation cancellation.
- Improved error handling for LFS uploads, ensuring proper feedback when no pointer info is returned.
- Enhanced remote branch existence check to propagate errors for non-revision issues, preventing silent failures.
- Updated conflict resolution to ensure all resolved files are staged successfully, with detailed error reporting for any failures.
- Improved logging for merge commit failures to provide clearer context on issues encountered during the process.
- Added logic to skip indices during empty-pointer recovery for LFS uploads, enhancing robustness.
- Updated error messages to provide clearer feedback when LFS content cannot be staged due to missing remote URL or authentication.
- Enhanced error reporting for failed LFS pointer uploads, detailing the batch and specific errors encountered.
TimRl and others added 24 commits March 5, 2026 01:16
- Updated LFS response validation to throw errors for better distinction between validation failures and structural issues.
- Improved logging for file read and conversion failures, collecting and reporting detailed information on issues encountered during processing.
- Added warnings for download failures, providing users with clear feedback on media files that could not be downloaded or processed.
… and status parsing

- Enhanced statusMatrix function in dugiteGit to better handle malformed porcelain lines, adding warnings for skipped entries.
- Updated GitBinaryManager to deduplicate concurrent calls for ensuring Git binaries, improving efficiency and reliability.
- Improved error handling in response processing for network requests, ensuring that error messages are captured without crashing the application.
- Introduced fetchWithTimeout function to handle API request timeouts, enhancing reliability in LFS operations.
- Updated retryWithBackoff to support abort signals, allowing for better cancellation handling during retries.
- Replaced fetch calls with fetchWithTimeout in LFS-related methods to ensure consistent timeout behavior.
- Enhanced error handling in conflict analysis to provide clearer feedback on fetch failures.
…error reporting

- Added --no-optional-locks flag to git commands in dugiteGit to prevent potential lock issues during operations.
- Improved statusMatrix function to handle malformed unmerged lines and log warnings for skipped entries.
- Replaced AbortController with fetchWithTimeout in GitService methods to streamline timeout management and enhance reliability.
- Updated timeout handling for LFS uploads and downloads to ensure consistent behavior across network requests.
… management

- Enhanced error detection for lock-related issues in dugiteGit by implementing regex checks for lock errors.
- Improved LFS pointer parsing in GitService to ensure that parsing errors are caught without falling through to raw uploads, enhancing robustness.
- Updated existingPointer handling to prevent unnecessary uploads when files are already LFS pointers, streamlining the upload process.
…ations. Added a distinct message for when uploads are finishing, improving user feedback in the UI. Refactored existing logic to accommodate this new behavior while maintaining current functionality.
…for network requests

- Introduced a centralized fetchWithRetry method to manage API calls with automatic authentication, exponential backoff, and jitter for retries.
- Added detailed network error descriptions to improve clarity on connection issues.
- Implemented a timeout mechanism for requests to prevent hanging operations.
- Refactored getCurrentUser and getProject methods to utilize the new fetchWithRetry method, streamlining error handling and improving reliability.
… offline detection

- Implemented timeout mechanisms for fast-forward and clone operations in GitService to prevent long-running processes.
- Added offline detection in SCMManager to provide user feedback when sync and publish operations are skipped due to lack of connectivity.
- Improved error reporting for offline scenarios, ensuring users receive clear messages regarding their network status.
…operations during workspace publishing. Updated event messaging to reflect progress accurately and ensured proper cleanup of sync state after operations.
…ded detection for orphan locks created by heartbeat race conditions and ensured in-memory state is cleared synchronously before async unlinking of lock files. Improved logging for better clarity on lock release scenarios.
- Updated remove functions to use ignore-unmatch, preventing errors when attempting to unstage files not in the index.
- Enhanced GitService to ensure safe deletion of orphaned files from the working tree.
- Added tests to verify no-op behavior for remove operations on untracked files.
…ectory-exclusion-38f1

Vscodeignore dist directory exclusion
…packaging, enhancing the build process by ensuring code quality prior to publication.
…ndling in GitService.

- Skipped git binary download in test mode to optimize testing performance.
- Added error handling for resolving local and remote branches to prevent incomplete merges.
- Implemented file existence check before staging to avoid errors during conflict resolution.
…ror handling during conflict resolution. This ensures clearer error messages when attempting to stage non-existent files, enhancing user feedback and robustness of the staging process.
…r improved clarity and consistency.

- Updated error messages related to sync setup, authentication, and project management to enhance user understanding.
- Changed terminology from "clone" to "download" for better alignment with user expectations.
- Improved messaging for project setup and synchronization processes to provide clearer guidance during operations.
… DNS, enhancing connectivity options for testing. This change improves the robustness of network-related functionalities.
…tialization with offline handling. Added checks for network availability before attempting to download the git binary, improving error handling during sync setup. Updated user feedback for offline scenarios to clarify sync limitations.
…stness

- Refactored dugiteGit to better route git operations based on configuration.
- Implemented file existence checks before staging and improved error messages for better user feedback during sync and conflict resolution.
- Updated package dependencies in `package-lock.json` to include new modules and versions, ensuring compatibility and stability.
…nsole.error for failed operations, improving log clarity and consistency.
…irectory. Enhanced git binary initialization with integrity checks and improved error handling for retries. Updated ensureGitBinary to return undefined when native binary is unavailable, allowing for better fallback handling.
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