Add include_uncommitted and include_untracked options to GitArchivePackager#211
Closed
oliverholworthy wants to merge 4 commits intoNVIDIA-NeMo:mainfrom
Closed
Conversation
Signed-off-by: Oliver Holworthy <oholworthy@nvidia.com>
Signed-off-by: Oliver Holworthy <oholworthy@nvidia.com>
Signed-off-by: Oliver Holworthy <oholworthy@nvidia.com>
Signed-off-by: Oliver Holworthy <oholworthy@nvidia.com>
Contributor
|
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
Contributor
|
This PR was closed because it has been inactive for 7 days since being marked as stale. |
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 PR adds two new features to the
GitArchivePackager:include_uncommitted: Option to include uncommitted changes in the packaged archiveinclude_untracked: Option to include untracked files in the packaged archivePurpose
By default,
git archiveonly includes committed files in the specified Git reference. These new options allow users to package their working state including uncommitted changes and untracked files, which is useful for development and testing scenarios where the user wants to package their current work-in-progress state.Features
include_uncommitted
When set to
True, uncommitted changes to tracked files will be included in the archive. This captures modifications that haven't been committed yet.include_untracked
When set to
True, untracked files will be included in the archive. This captures new files that haven't been added to git yet.Combined usage
Both options can be used together to capture the complete working state:
Implementation Details
git diff --name-onlyto find uncommitted changesgit ls-files --others --exclude-standardto find untracked filessubpathoption, only including uncommitted/untracked files within the specified subpathTesting
Added comprehensive tests to verify all functionality: