Refactored to use inheritance and separate logic where possible. Addressed comments. Change-Id: I9e62414cd83121575bdf99a3b47466a7585bedb6 Former-commit-id:e4be1f24e7
[formerlydbba727f3d
] [formerlye4be1f24e7
[formerlydbba727f3d
] [formerly17196b5dcd
[formerly 6e015b3f61c20635077d6e8271e9b763e5a32fe1]]] Former-commit-id:17196b5dcd
Former-commit-id:ff87317bd4
[formerly8b279966d1
] Former-commit-id:b3fd8e5480
22 lines
271 B
Bash
Executable file
22 lines
271 B
Bash
Executable file
#!/bin/sh
|
|
|
|
dir=`dirname $0`
|
|
|
|
sedCmd=''
|
|
if [ -n "$1" ]
|
|
then
|
|
sedCmd="s/Change-Id/Amend: $1\n\nChange-Id/"
|
|
fi
|
|
|
|
sedCmd="sed -i '$sedCmd'"
|
|
|
|
git add -A
|
|
export EDITOR=$sedCmd
|
|
echo "EDITOR command = $EDITOR"
|
|
git commit --amend
|
|
|
|
# Push
|
|
$dir/upush
|
|
|
|
# Show stats
|
|
$dir/ustat
|