Merge remote-tracking branch 'bleis/master'

This commit is contained in:
Yasuharu NAKANO 2011-07-26 01:14:32 +09:00
commit 6ff28b4b12
2 changed files with 10 additions and 2 deletions

2
.vimrc Normal file
View file

@ -0,0 +1,2 @@
nnoremap <Space>gn :<C-u>w<CR>:Git now<CR>
nnoremap <Space>gN :<C-u>w<CR>:Git now --all<CR>

10
git-now
View file

@ -1,7 +1,7 @@
#!/bin/sh
PREFIX="from now"
MESSAGE="[${PREFIX}] `date`"
MESSAGE="[${PREFIX}] `date +\"%Y/%m/%d %T\"`"
if [ $# -eq 0 ]
then
@ -9,7 +9,13 @@ then
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
elif [ $1 != "--rebase" ]
then
git add $@
if [ $1 != "--all" ]
then
git add $@
else
git add -u
git add .
fi
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
else
FIRST_NOW_COMMIT=`git log --pretty=oneline --grep="${PREFIX}" | tail -n 1 | cut -d " " -f 1`