-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add pathspec support in git-missing
#1156
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@hyperupcall Sorry for slight delay in response. Thank you for the ultra fast review and quality feedback. 👍🏻 |
@Weyzu Thanks! Everything looks great to me! @spacewander what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you update the md https://github.com/tj/git-extras/blob/main/man/git-missing.md and generate new doc from it?
Thanks!
@spacewander Sure thing, updated. :) (8716c18 + d3c1b3a) Let me know if I phrased it all correctly. |
Merged. Thanks! |
This PR add pathspec support for the
git-missing
command. 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: