Merge branch 'release/0.0.3'

This commit is contained in:
Motonori Iwata 2011-09-05 17:35:50 +09:00
commit b606b79f71
2 changed files with 14 additions and 5 deletions

View file

@ -1,5 +1,5 @@
usage() {
echo "usage: git now grep [<base-branch>]"
echo "usage: git now grep [--patch|-p] [--stat|-s] [<base-branch>]"
}
cmd_default() {
@ -8,18 +8,27 @@ cmd_default() {
if [ -n "$BASE_BRANCH" ]; then
WORKING_BRANCH=$(git_current_branch)
COMMON_ANCESTOR_COMMIT=`git merge-base ${BASE_BRANCH} ${WORKING_BRANCH}`
echo `git log ${COMMON_ANCESTOR_COMMIT}.. --pretty=oneline --grep="${PREFIX}"`
git log${ARGS} ${COMMON_ANCESTOR_COMMIT}.. --pretty=format:"%h - %an, %ar : %s" --grep="${PREFIX}"
else
echo `git log --pretty=oneline --grep="${PREFIX}"`
git log${ARGS} --pretty=format:"%h - %an, %ar : %s" --grep="${PREFIX}"
fi
}
parse_args() {
# parse options
DEFINE_boolean 'patch' false 'generate diff in patch format' 'p'
DEFINE_boolean 'stat' false 'generate diffstat instead of patch' 's'
FLAGS "$@" || exit $?
eval set -- "${FLAGS_ARGV}"
# read arguments into global variables
BASE_BRANCH=$1
ARGS=
if flag patch; then
ARGS="${ARGS} -p"
fi
if flag stat; then
ARGS="${ARGS} --stat"
fi
}
cmd_help() {

View file

@ -1,8 +1,8 @@
require 'formula'
class GitNow < Formula
url 'https://github.com/iwata/git-now.git', :tag => 'v0.0.22'
version '0.0.22'
url 'https://github.com/iwata/git-now.git', :tag => 'v0.0.3'
version '0.0.3'
head 'https://github.com/iwata/git-now.git', :branch => 'develop'
homepage 'https://github.com/iwata/git-now'