aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2014-11-16 21:39:05 -0500
committerRuss Cox <rsc@swtch.com>2014-11-16 21:48:16 -0500
commit0edb04685bfac6ba0373398f3e9ee561dbaae6bf (patch)
tree55f73849b1e3c092ba846273cc5e6601e9e461fd /bin
parent294f22a4705f221b9f5cf0d8df0dc7cf7626b886 (diff)
downloadplan9port-0edb04685bfac6ba0373398f3e9ee561dbaae6bf.tar.gz
plan9port-0edb04685bfac6ba0373398f3e9ee561dbaae6bf.tar.bz2
plan9port-0edb04685bfac6ba0373398f3e9ee561dbaae6bf.zip
codereview: make commit -a the default; warn about uncommitted changes at upload
also update README.md for github Change-Id: I7d578a902ffed7f6d69780721e29a1972b6f6992
Diffstat (limited to 'bin')
-rwxr-xr-xbin/codereview8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/codereview b/bin/codereview
index 6fd3e11a..6606a5c6 100755
--- a/bin/codereview
+++ b/bin/codereview
@@ -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