mirror of
https://github.com/iwata/git-now.git
synced 2026-09-12 00:16:18 -04:00
This commit is contained in:
parent
69967f8ae1
commit
e2c686bd38
7
git-now
7
git-now
|
|
@ -5,13 +5,14 @@ MESSAGE="[${PREFIX}] `date`"
|
|||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
git commit -a -m "${MESSAGE}"
|
||||
git add -u
|
||||
echo -e "${MESSAGE}\n\n`git diff --cached`" | git commit -F -
|
||||
elif [ $1 != "--rebase" ]
|
||||
then
|
||||
git add $@
|
||||
git commit -m "${MESSAGE}"
|
||||
echo -e "${MESSAGE}\n\n`git diff --cached`" | git commit -F -
|
||||
else
|
||||
FIRST_NOW_COMMIT=`git log --pretty=oneline | grep "${PREFIX}" | tail -n 1 | cut -d " " -f 1`
|
||||
FIRST_NOW_COMMIT=`git log --pretty=oneline --grep "${PREFIX}" | tail -n 1 | cut -d " " -f 1`
|
||||
INITIAL_COMMIT=`git log --pretty=oneline | tail -n 1 | cut -d " " -f 1`
|
||||
|
||||
if [ ${FIRST_NOW_COMMIT} != ${INITIAL_COMMIT} ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue