Add --trivial option for trivial changes.
This one causes sunrise-commit to not update the ChangeLog on a trivial change (e.g. a Manifest fix).
This commit is contained in:
parent
6cfe72f59e
commit
0786203159
@ -113,13 +113,14 @@ Options:
|
||||
|
||||
-c, --changelog backwards compat (ignored),
|
||||
-C, --nocolor disable colorful output,
|
||||
-t, --trivial trivial changes (do not add a ChangeLog entry),
|
||||
-v, --verbose enable verbose output.
|
||||
_EOH_
|
||||
}
|
||||
|
||||
# Guess what!
|
||||
main() {
|
||||
local commitmsg monochrome
|
||||
local commitmsg monochrome trivial
|
||||
unset SC_VERBOSE
|
||||
|
||||
while [ ${#} -gt 0 ]; do
|
||||
@ -139,6 +140,9 @@ main() {
|
||||
-C|--nocolor)
|
||||
monochrome=1
|
||||
;;
|
||||
-t|--trivial)
|
||||
trivial=1
|
||||
;;
|
||||
-v|--verbose)
|
||||
SC_VERBOSE=1
|
||||
;;
|
||||
@ -194,13 +198,18 @@ main() {
|
||||
bns=$(echo "${commitmsg}" | grep -o -E '[0-9]{4,}')
|
||||
|
||||
# Creating a new ChangeLog? Let's take a look at the commit message.
|
||||
[ ! -f ChangeLog -a -z "${bns}" ] && die 'Please supply the bug number in the initial commit message!'
|
||||
if [ ! -f ChangeLog ]; then
|
||||
[ -n "${trivial}" ] && die "Trivial change for an initial commit? You're joking, right?"
|
||||
[ -z "${bns}" ] && die 'Please supply the bug number in the initial commit message!'
|
||||
fi
|
||||
|
||||
sayv '...and appending to it.'
|
||||
req echangelog "${commitmsg}"
|
||||
if [ -z "${trivial}" ]; then
|
||||
sayv '...and appending to it.'
|
||||
req echangelog "${commitmsg}"
|
||||
echo
|
||||
fi
|
||||
|
||||
if [ -n "${bns}" ]; then
|
||||
echo
|
||||
local bn cbn
|
||||
for bn in ${bns}; do
|
||||
cbn=#${WHITE}${bn}${NORMAL}
|
||||
|
Loading…
Reference in New Issue
Block a user