awips2/tools/scripts/uamend
Steve Harris 2a31a4c3e9 Issue #708 - new script for setting up Gerrit hook and aliases
Change-Id: Iabdc5005ed9376e31414429a76898c0798d8e7ff

Former-commit-id: 492e6fe379 [formerly ec3999181ac1f2d2d0ca7f469b69a5bf83633570]
Former-commit-id: 209299d1cb
2012-06-22 11:39:00 -05:00

22 lines
271 B
Bash

#!/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/gpush
# Show stats
$dir/gstat