tj.git-extras/man/git-missing.1
Wiktor Żurawik f0b9e18e54
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
Add pathspec support in git-missing (#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
2024-08-26 10:38:15 +08:00

92 lines
1.9 KiB
Groff

.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-MISSING" "1" "August 2024" "" "Git Extras"
.
.SH "NAME"
\fBgit\-missing\fR \- Show commits missing from another branch
.
.SH "SYNOPSIS"
\fBgit\-missing\fR [<first branch>] <second branch> [<git log options>] [[\-\-] <path>\.\.\.]
.
.SH "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\. Optionally, the comparison can be limited to specific paths\.
.
.SH "OPTIONS"
[<first branch>]
.
.P
First branch to compare\. If not specified, defaults to currently checked out branch\.
.
.P
<second branch>
.
.P
Second branch to compare\.
.
.P
[<git log options>]
.
.P
Any flags that should be passed to \'git log\', such as \-\-no\-merges\.
.
.P
[[\-\-] <path>\.\.\.]
.
.P
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] \fIhttps://git\-scm\.com/docs/gitglossary#Documentation/gitglossary\.txt\-aiddefpathspecapathspec\fR\.
.
.SH "EXAMPLES"
Show commits on either my current branch or master but not both:
.
.IP "" 4
.
.nf
$ git missing master
< d14b8f0 only on current checked out branch
> 97ef387 only on master
.
.fi
.
.IP "" 0
.
.P
Show commits on either branch foo or branch bar but not both:
.
.IP "" 4
.
.nf
$ git missing foo bar
< b8f0d14 only on foo
> f38797e only on bar
.
.fi
.
.IP "" 0
.
.P
Show commits on either my current branch or master but not both, limited to the src/ directory:
.
.IP "" 4
.
.nf
$ git missing master \-\- src/
< ed52989 only on current checked out branch, in src/ directory
> 7988c4b only on master, in src/ directory
.
.fi
.
.IP "" 0
.
.SH "AUTHOR"
Written by Nate Jones <\fInate@endot\.org\fR>
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/tj/git\-extras\fR>