From f42bb6c21faea924e3ff6e028a5db712091d4413 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Wed, 20 Jan 1999 22:06:09 +0000 Subject: [PATCH] print list of locally modified files to stderr --- commit | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/commit b/commit index 40a1dd4d3..9c5b6aa20 100755 --- a/commit +++ b/commit @@ -25,11 +25,14 @@ elif test $# -gt 1 && test x"$1" = x"-F"; then fi echo "Checking whether repository is up to date..." >&2 -commit=`cvs $cvsopt stat ${1+"$@"} 2>/dev/null | grep Status \ - | egrep -v '(Up-to-date|Locally )'` - -if test -n "$commit"; then - echo "$commit" +if cvs $cvsopt stat ${1+"$@"} 2>/dev/null | grep Status \ + | while read line; do + case "$line" in + *"Up-to-date") :;; + *"Locally Modified") echo "$line" >&2;; + *) echo "$line";; + esac + done | grep .; then exit 1 fi -- 2.47.2