Add pathspec support in git-missing#1156
Merged
spacewander merged 4 commits intotj:mainfrom Aug 26, 2024
Weyzu:feat/add-pathspec-to-git-missing
Merged
Add pathspec support in git-missing#1156spacewander merged 4 commits intotj:mainfrom Weyzu:feat/add-pathspec-to-git-missing
git-missing#1156spacewander merged 4 commits intotj:mainfrom
Weyzu:feat/add-pathspec-to-git-missing
Conversation
Allow to specify a path to limit the commit difference list. This improvement allows users to focus on changes in specific directories or files when comparing branches for missing commits.
hyperupcall
requested changes
Aug 20, 2024
Collaborator
hyperupcall
left a comment
There was a problem hiding this comment.
Thanks for this fix! I did see a bug - that passing multiple files to be used as a pathspec is not supported. My comments have more details
- Change pathspec from string to array to support multiple pathspecs - Remove unnecessary 'shift' command in argument processing loop - Simplify git log command execution by using a single codepath
Contributor
Author
|
@hyperupcall Sorry for slight delay in response. Thank you for the ultra fast review and quality feedback. 👍🏻 |
Collaborator
|
@Weyzu Thanks! Everything looks great to me! @spacewander what do you think? |
spacewander
reviewed
Aug 23, 2024
Collaborator
spacewander
left a comment
There was a problem hiding this comment.
Would you update the md https://github.com/tj/git-extras/blob/main/man/git-missing.md and generate new doc from it?
Thanks!
Contributor
Author
|
@spacewander Sure thing, updated. :) (8716c18 + d3c1b3a) Let me know if I phrased it all correctly. |
hyperupcall
approved these changes
Aug 24, 2024
spacewander
approved these changes
Aug 26, 2024
Collaborator
|
Merged. Thanks! |
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 add pathspec support for the
git-missingcommand. Users can now limit the commit difference to specific directories or files. Addition is particularly useful for big repositories where users are not concerned with other directories outside their usual workspace.Pathspec is optional, command will work as usual for users not using it.
New Usage
Example
Compare differences between the current branch and master, limited to the
src/directory: