mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
Merge pull request #159 from code42day/no-merges-changelog
Add --no-merges option to git-changelog
This commit is contained in:
commit
e91da7c2b4
|
|
@ -3,6 +3,7 @@
|
|||
FILE=""
|
||||
LIST=false
|
||||
TAG="n.n.n"
|
||||
GIT_LOG_OPTS=""
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
|
@ -13,6 +14,9 @@ while [ "$1" != "" ]; do
|
|||
TAG=$2
|
||||
shift
|
||||
;;
|
||||
--no-merges )
|
||||
GIT_LOG_OPTS='--no-merges'
|
||||
;;
|
||||
* )
|
||||
FILE=$1
|
||||
;;
|
||||
|
|
@ -26,9 +30,9 @@ HEAD="\n$TAG / $DATE\n==================\n\n"
|
|||
if $LIST; then
|
||||
version=$(git describe --tags --abbrev=0 $(git rev-list --tags --max-count=1))
|
||||
if test -z "$version"; then
|
||||
git log --pretty="format: * %s"
|
||||
git log $GIT_LOG_OPTS --pretty="format: * %s"
|
||||
else
|
||||
git log --pretty="format: * %s" $version..
|
||||
git log $GIT_LOG_OPTS --pretty="format: * %s" $version..
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
|
@ -42,7 +46,7 @@ if test "$CHANGELOG" = ""; then
|
|||
fi
|
||||
tmp="/tmp/changelog"
|
||||
printf "$HEAD" > $tmp
|
||||
git-changelog --list >> $tmp
|
||||
git-changelog $GIT_LOG_OPTS --list >> $tmp
|
||||
printf '\n' >> $tmp
|
||||
if [ -f $CHANGELOG ]; then cat $CHANGELOG >> $tmp; fi
|
||||
mv $tmp $CHANGELOG
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ _git_bug(){
|
|||
}
|
||||
|
||||
_git_changelog(){
|
||||
__gitcomp "-l -t --list --tag"
|
||||
__gitcomp "-l -t --list --tag --no-merges"
|
||||
}
|
||||
|
||||
_git_contrib(){
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" https://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-CHANGELOG" "1" "July 2012" "" ""
|
||||
.TH "GIT\-CHANGELOG" "1" "December 2013" "" "Git Extras"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-changelog\fR \- Generate the changelog report
|
||||
|
|
@ -18,6 +18,12 @@ Populates the file named matching \fIchange|history \-i\fR with the commits sinc
|
|||
.P
|
||||
Show commit logs from the current version\.
|
||||
.
|
||||
.P
|
||||
\-\-no\-merges
|
||||
.
|
||||
.P
|
||||
Filters out merge commits (commits with more than 1 parent) from generated changelog\.
|
||||
.
|
||||
.SH "EXAMPLES"
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
|
|
@ -71,7 +77,7 @@ Initial commit
|
|||
Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttp://github\.com/visionmedia/git\-extras/issues\fR>
|
||||
<\fIhttps://github\.com/visionmedia/git\-extras/issues\fR>
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
<\fIhttp://github\.com/visionmedia/git\-extras\fR>
|
||||
<\fIhttps://github\.com/visionmedia/git\-extras\fR>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv='content-type' value='text/html;charset=utf8'>
|
||||
<meta name='generator' value='Ronn/v0.7.3 (https://github.com/rtomayko/ronn/tree/0.7.3)'>
|
||||
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
|
||||
<title>git-changelog(1) - Generate the changelog report</title>
|
||||
<style type='text/css' media='all'>
|
||||
/* style: man */
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
<ol class='man-decor man-head man head'>
|
||||
<li class='tl'>git-changelog(1)</li>
|
||||
<li class='tc'></li>
|
||||
<li class='tc'>Git Extras</li>
|
||||
<li class='tr'>git-changelog(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
@ -88,6 +88,10 @@
|
|||
|
||||
<p> Show commit logs from the current version.</p>
|
||||
|
||||
<p> --no-merges</p>
|
||||
|
||||
<p> Filters out merge commits (commits with more than 1 parent) from generated changelog.</p>
|
||||
|
||||
<h2 id="EXAMPLES">EXAMPLES</h2>
|
||||
|
||||
<ul>
|
||||
|
|
@ -116,7 +120,7 @@
|
|||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Tj Holowaychuk <<a href="mailto:tj@vision-media.ca" data-bare-link="true">tj@vision-media.ca</a>></p>
|
||||
<p>Written by Tj Holowaychuk <<a href="mailto:tj@vision-media.ca" data-bare-link="true">tj@vision-media.ca</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -129,7 +133,7 @@
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>July 2012</li>
|
||||
<li class='tc'>December 2013</li>
|
||||
<li class='tr'>git-changelog(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@ git-changelog(1) -- Generate the changelog report
|
|||
|
||||
Show commit logs from the current version.
|
||||
|
||||
--no-merges
|
||||
|
||||
Filters out merge commits (commits with more than 1 parent) from generated changelog.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
* Updating changelog file:
|
||||
|
|
|
|||
Loading…
Reference in a new issue