Update Evergit to version 0.2.1 with enhanced features#19
Merged
IanSkelskey merged 15 commits intomainfrom Jun 26, 2025
Merged
Conversation
Introduce getGitRootDir function to consistently determine the Git root directory for executing Git commands. This change modifies existing Git utility functions to use the -C flag with the root directory, ensuring that all operations execute in the correct repository context, which enhances reliability when scripts are run from subdirectories. Release-Note: Add support for executing Git commands from any subdirectory within a repository Signed-off-by: Ian Skelskey <[email protected]>
Introduce a new integration test for the `getGitRootDir` utility function. This test verifies the function correctly returns the root directory of the Git repository by comparing normalized directory paths. This enhancement ensures that path inconsistencies due to different operating systems do not affect test outcomes. Release-Note: add integration test for getGitRootDir utility function Signed-off-by: Ian Skelskey <[email protected]>
- Incorporated comprehensive tests covering git operations: staging, unstaging, listing changes, and handling remote repositories. - Introduced tests for special character handling in commit messages, remote detection, and user info retrieval. - Provided tests for buffer overflow scenarios and upstream branch setup. Release-Note: Enhance integration test coverage for git utilities Signed-off-by: Ian Skelskey <[email protected]>
…detached HEAD state
Enhance error handling in `getCurrentBranchName` by trailing commas for execSync calls configuration - Clean up whitespace for consistent formatting - Ensure errors are captured and a default branch is used where relevant Release-Note: improve error handling in branch name retrieval function Signed-off-by: Ian Skelskey <[email protected]>
Clean up whitespace inconsistencies in the Git utilities integration tests - Remove trailing spaces and ensure uniform spacing throughout the test file for better readability - Simplify setup process by ensuring clear separation between logical sections Signed-off-by: Ian Skelskey <[email protected]>
Ensure `getUserInfo` handles cases where Git user name or email is not configured by providing detailed error messages and guidance for setting these values. Update `getName` and `getEmail` functions to properly handle errors when Git user information is not set. - Add error handling to `getName` and `getEmail` to return empty strings if Git is not configured. - Extend `getUserInfo` to suggest configuration commands when name or email is missing. - Add integration tests to verify behavior when Git user configurations are missing. Release-Note: Improve user guidance for missing Git config in commit process Signed-off-by: Ian Skelskey <[email protected]>
Owner
Author
Version 0.2.1 introduces several key improvements: - Enhanced error handling and support for new repositories in `getCurrentBranchName`. - Added integration tests and refactored Git utilities tests for consistency. - Introduced git root directory support in Git functions. - Improved code quality with prettier formatting. Release-Note: Update includes enhanced error handling, testing, and new git directory support. Signed-off-by: Ian Skelskey <[email protected]>
This commit updates the GitHub Actions workflow to utilize `actions/upload-artifact@v4` instead of the previous version. This change is intended to leverage improvements and fixes available in the newer version of the action. Release-Note: update GitHub Action to upload-artifact@v4 Signed-off-by: Ian Skelskey <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to Git utility functions and their associated tests, focusing on better handling of repository paths, enhanced error handling, and expanded test coverage. Key changes include the addition of a
getGitRootDirfunction to ensure all Git commands are executed from the repository root, improved handling of detached HEAD states and unconfigured Git user details, and comprehensive integration tests for various scenarios.Git Utility Enhancements:
getGitRootDirto determine the root directory of the Git repository and updated all Git commands to use the-Cflag for consistent execution from the repository root. (src/util/git.ts, [1] [2] [3] [4] [5] [6]getCurrentBranchNameto handle detached HEAD states and new repositories with no commits, and added fallback mechanisms for branch name determination. (src/util/git.ts, src/util/git.tsL105-R193)user.nameanduser.emailare configured, with detailed instructions provided if missing. (src/cmd/commit.ts, src/cmd/commit.tsR134-R154)Test Suite Expansion:
getGitRootDir, handling of new repositories, detection of ignored files, and staging/unstaging functionality. (tests/util/git.test.ts, [1] [2] [3] [4] [5] [6]getDiffForStagedFiles. (tests/util/git.test.ts, tests/util/git.test.tsR103-R258)These changes improve reliability and maintainability of the Git utilities while ensuring robust testing for edge cases.