mirror of https://github.com/perkeep/perkeep.git
Make review script download Change-Id hook if missing.
Change-Id: I22fd093a6bcad6671700423c27f557aa045a028f
This commit is contained in:
parent
5ee34188f2
commit
ca441a0e1a
20
misc/review
20
misc/review
|
@ -1,3 +1,23 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
TOPLEVEL_DIR=$(readlink -f $(dirname $(readlink -f $0))/..)
|
||||
HOOK_FILE="$TOPLEVEL_DIR/.git/hooks/commit-msg"
|
||||
if ! test -e "$HOOK_FILE"; then
|
||||
cat - <<EOF
|
||||
Presubmit hook to add Change-Id to commit messages is missing.
|
||||
Downloading to $HOOK_FILE...
|
||||
EOF
|
||||
scp -p -P 29418 $USER@camlistore.org:hooks/commit-msg "$HOOK_FILE"
|
||||
cat - <<EOF
|
||||
|
||||
Amending last commit to add Change-Id.
|
||||
Please re-save description without making changes.
|
||||
|
||||
Press Enter to continue.
|
||||
EOF
|
||||
read foo
|
||||
git commit --amend
|
||||
fi
|
||||
|
||||
git push ssh://$USER@camlistore.org:29418/camlistore HEAD:refs/for/master
|
||||
|
|
Loading…
Reference in New Issue