mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
allow options to be passed through to git log
This commit is contained in:
parent
63d707c33c
commit
e5c8d79e66
|
|
@ -1,7 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
firstbranch=$1
|
||||
secondbranch=$2
|
||||
# grab first two non-option arguments
|
||||
for arg in $*; do
|
||||
if [[ $arg != -* ]]; then
|
||||
test -z "$firstbranch" && firstbranch=$arg && continue
|
||||
test -z "$secondbranch" && secondbranch=$arg && continue
|
||||
else
|
||||
# add anything else to a passthrough
|
||||
passthrough="$passthrough $arg"
|
||||
fi
|
||||
done
|
||||
|
||||
test -z "$firstbranch" && echo "at least one branch required" && exit 1
|
||||
|
||||
|
|
@ -10,4 +18,4 @@ if test -z "$secondbranch"; then
|
|||
firstbranch=
|
||||
fi
|
||||
|
||||
git log $firstbranch...$secondbranch --format="%m %h %s" --left-right
|
||||
git log $passthrough $firstbranch...$secondbranch --format="%m %h %s" --left-right
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-MISSING" "1" "December 2011" "" "Git Extras"
|
||||
.TH "GIT\-MISSING" "1" "March 2012" "" "Git Extras"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-missing\fR \- Show commits missing from another branch
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-missing\fR [<first branch>] <second branch>
|
||||
\fBgit\-missing\fR [<first branch>] <second branch> [<git log options>]
|
||||
.
|
||||
.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\.
|
||||
|
|
@ -24,6 +24,12 @@ First branch to compare\. If not specified, defaults to currently checked out br
|
|||
.P
|
||||
Second branch to compare\.
|
||||
.
|
||||
.P
|
||||
[<git log options>]
|
||||
.
|
||||
.P
|
||||
Any flags that should be passed to \'git log\', such as \-\-no\-merges\.
|
||||
.
|
||||
.SH "EXAMPLES"
|
||||
Show commits on either my current branch or master but not both:
|
||||
.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p><code>git-missing</code> [<first branch>] <second branch></p>
|
||||
<p><code>git-missing</code> [<first branch>] <second branch> [<git log options>]</p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
|
@ -93,6 +93,10 @@
|
|||
|
||||
<p> Second branch to compare.</p>
|
||||
|
||||
<p> [<git log options>]</p>
|
||||
|
||||
<p> Any flags that should be passed to 'git log', such as --no-merges.</p>
|
||||
|
||||
<h2 id="EXAMPLES">EXAMPLES</h2>
|
||||
|
||||
<p> Show commits on either my current branch or master but not both:</p>
|
||||
|
|
@ -111,7 +115,7 @@
|
|||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Nate Jones <<a href="mailto:nate@endot.org" data-bare-link="true">nate@endot.org</a>></p>
|
||||
<p>Written by Nate Jones <<a href="mailto:nate@endot.org" data-bare-link="true">nate@endot.org</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -124,7 +128,7 @@
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>December 2011</li>
|
||||
<li class='tc'>March 2012</li>
|
||||
<li class='tr'>git-missing(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ git-missing(1) -- Show commits missing from another branch
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-missing` [<first branch>] <second branch>
|
||||
`git-missing` [<first branch>] <second branch> [<git log options>]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
@ -20,6 +20,10 @@ git-missing(1) -- Show commits missing from another branch
|
|||
|
||||
Second branch to compare.
|
||||
|
||||
[<git log options>]
|
||||
|
||||
Any flags that should be passed to 'git log', such as --no-merges.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
Show commits on either my current branch or master but not both:
|
||||
|
|
|
|||
Loading…
Reference in a new issue