From 51d3779582d20cab2d535760fd8f58e8e1ee0004 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sat, 29 Sep 2007 15:40:09 -0400 Subject: [PATCH] Fixed `sde ci` to pass a clean diff to the awk script which tries to generate a log message --- bin/sde-commit | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/sde-commit b/bin/sde-commit index d4593e5..7bb79f5 100755 --- a/bin/sde-commit +++ b/bin/sde-commit @@ -122,6 +122,12 @@ if [ ".git" ]; then # git status git-diff-index -M --color --cached --stat=80,65 HEAD > $tmpfile.status git-diff-index -M --color --cached -p HEAD | sed -e "s,^\(.\[1m\|\)\(---\|\+\+\+\) [ab]/,\1\2 $root/," > $tmpfile.diff + + if [ -z "$logfile" ]; then + logfile=$tmpfile.log + git-diff-index -M --cached -p HEAD | sed -e "s,^\(---\|\+\+\+\) [ab]/,\1 $root/," | + awk -f $SDEROOT/lib/sde-commit/commit-message.awk > $logfile + fi else echo_abort "$root: unknown version control system." fi @@ -129,13 +135,6 @@ fi echo_msg "Changes:" cat $tmpfile.diff -if [ -z "$logfile" ]; then - logfile=$tmpfile.log - # the grep -v === is a hack - somehow the svn === lines confuse awk ... ?!? - grep -v === $tmpfile.diff | - awk -f $SDEROOT/lib/sde-commit/commit-message.awk > $logfile -fi - echo_msg "Status:" cat $tmpfile.status