mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Merge branch 'changelog'
This commit is contained in:
commit
32a413f2d2
17
History.md
17
History.md
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
0.0.1 / 2010-08-05
|
||||
==================
|
||||
|
||||
* Docs for git-ignore. Closes #3
|
||||
* Merge branch 'ignore'
|
||||
* Added git-ignore
|
||||
* Readme typo
|
||||
* Fixed <tag> in docs
|
||||
* Install docs
|
||||
* Merge branch 'release'
|
||||
* Added git-release
|
||||
* Fixed readme
|
||||
* Readme
|
||||
* Passing args to git shortlog
|
||||
* Added --all support to git-count
|
||||
* Initial commit
|
||||
2
Makefile
2
Makefile
|
|
@ -3,6 +3,7 @@ PREFIX = /usr/local
|
|||
|
||||
BINS = bin/git-count \
|
||||
bin/git-ignore \
|
||||
bin/git-changelog \
|
||||
bin/git-release
|
||||
|
||||
install:
|
||||
|
|
@ -11,6 +12,7 @@ install:
|
|||
uninstall:
|
||||
rm -f $(PREFIX)/bin/git-count
|
||||
rm -f $(PREFIX)/bin/git-ignore
|
||||
rm -f $(PREFIX)/bin/git-changelog
|
||||
rm -f $(PREFIX)/bin/git-release
|
||||
|
||||
.PHONY: install uninstall
|
||||
36
Readme.md
36
Readme.md
|
|
@ -60,3 +60,39 @@
|
|||
... added 'build'
|
||||
... added '*.o'
|
||||
... added '*.log'
|
||||
|
||||
## git-changelog
|
||||
|
||||
Populates the file named matching _change|history -i_ with the commits
|
||||
since the previous tag or since the project began when no tags are present. Opens the changelog in **$EDITOR** when set.
|
||||
|
||||
$ git changelog
|
||||
|
||||
n.n.n / 2010-08-05
|
||||
==================
|
||||
|
||||
* Docs for git-ignore. Closes #3
|
||||
* Merge branch 'ignore'
|
||||
* Added git-ignore
|
||||
* Fixed <tag> in docs
|
||||
* Install docs
|
||||
* Merge branch 'release'
|
||||
* Added git-release
|
||||
* Passing args to git shortlog
|
||||
* Added --all support to git-count
|
||||
* Initial commit
|
||||
|
||||
Listing commits:
|
||||
|
||||
$ git changelog --list
|
||||
|
||||
* Docs for git-ignore. Closes #3
|
||||
* Merge branch 'ignore'
|
||||
* Added git-ignore
|
||||
* Fixed <tag> in docs
|
||||
* Install docs
|
||||
* Merge branch 'release'
|
||||
* Added git-release
|
||||
* Passing args to git shortlog
|
||||
* Added --all support to git-count
|
||||
* Initial commit
|
||||
|
|
|
|||
22
bin/git-changelog
Executable file
22
bin/git-changelog
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
CHANGELOG=`ls | egrep 'change|history' -i`
|
||||
DATE=`date +'%Y-%m-%d'`
|
||||
HEAD="\nn.n.n / $DATE \n==================\n"
|
||||
|
||||
if test "$1" = "--list"; then
|
||||
version=`git tag | tail -n 1`
|
||||
if test -z "$version"; then
|
||||
git log --pretty="format: * %s"
|
||||
else
|
||||
git log --pretty="format: * %s" $version..
|
||||
fi
|
||||
else
|
||||
tmp="/tmp/changelog"
|
||||
echo $HEAD > $tmp
|
||||
git-changelog --list >> $tmp
|
||||
echo '' >> $tmp
|
||||
cat $CHANGELOG >> $tmp
|
||||
mv $tmp $CHANGELOG
|
||||
test -n "$EDITOR" && $EDITOR $CHANGELOG
|
||||
fi
|
||||
Loading…
Reference in a new issue