forked from tj/git-extras
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pathspec support in
git-missing
(tj#1156)
* feat: Add pathspec support in git-missing 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. * refactor: Improve pathspec handling in git-missing - 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 * chore: Update git-missing docs * chore: Fix a typo in git-missing docs
- Loading branch information
Showing
5 changed files
with
85 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,13 @@ git-missing(1) -- Show commits missing from another branch | |
|
||
## SYNOPSIS | ||
|
||
`git-missing` [<first branch>] <second branch> [<git log options>] | ||
`git-missing` [<first branch>] <second branch> [<git log options>] [[--] <path>...] | ||
|
||
## DESCRIPTION | ||
|
||
Shows commits that are in either of two branches but not both. Useful for | ||
seeing what would come across in a merge or push. | ||
Shows commits that are in either of two branches but not both. Useful for | ||
seeing what would come across in a merge or push. Optionally, the comparison | ||
can be limited to specific paths. | ||
|
||
## OPTIONS | ||
|
||
|
@@ -24,6 +25,12 @@ git-missing(1) -- Show commits missing from another branch | |
|
||
Any flags that should be passed to 'git log', such as --no-merges. | ||
|
||
[[--] <path>...] | ||
|
||
Optional path specifications (pathspec) to limit the comparison to specific | ||
files or directories. For more details about the pathspec syntax, see the | ||
pathspec entry in [gitglossary[7]](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec). | ||
|
||
## EXAMPLES | ||
|
||
Show commits on either my current branch or master but not both: | ||
|
@@ -38,6 +45,13 @@ git-missing(1) -- Show commits missing from another branch | |
< b8f0d14 only on foo | ||
> f38797e only on bar | ||
|
||
Show commits on either my current branch or master but not both, limited to the | ||
src/ directory: | ||
|
||
$ git missing master -- src/ | ||
< ed52989 only on current checked out branch, in src/ directory | ||
> 7988c4b only on master, in src/ directory | ||
|
||
## AUTHOR | ||
|
||
Written by Nate Jones <<[email protected]>> | ||
|