codereview: make commit -a the default; warn about uncommitted changes at upload

also update README.md for github

Change-Id: I7d578a902ffed7f6d69780721e29a1972b6f6992
This commit is contained in:
Russ Cox 2014-11-16 21:39:05 -05:00
parent 294f22a470
commit 0edb04685b
3 changed files with 38 additions and 25 deletions

View file

@ -59,7 +59,7 @@ case create
if($show) {
echo '% git branch '$branch' && git commit || git branch -d '$branch >[1=2]
}
git branch $branch && git checkout $branch && git commit $* || git branch -d $branch
git branch $branch && git checkout $branch && git commit -a $* || git branch -d $branch
case commit
shift
@ -72,7 +72,7 @@ case commit
$git commit $*
exit $status
}
$git commit --amend $*
$git commit --amend -a $*
exit $status
case upload
@ -88,6 +88,10 @@ case upload
if(! 9 grep 'machine plan9port-review.googlesource.com' $HOME/.netrc >/dev/null >[2=1]) {
echo 'codereview: warning: cannot find plan9port-review in netrc' >[1=2]
}
if(! git status | 9 grep 'nothing to commit, working directory clean' >/dev/null) {
echo 'codereview: warning: local changes not yet committed' >[1=2]
git status
}
$git push https://plan9port-review.googlesource.com/plan9 HEAD:refs/for/master >[2=1] | 9 sed 's/.* //'
case sync