From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29774 invoked from network); 11 Oct 1999 22:47:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Oct 1999 22:47:31 -0000 Received: (qmail 8655 invoked by alias); 11 Oct 1999 22:47:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8214 Received: (qmail 8645 invoked from network); 11 Oct 1999 22:47:20 -0000 Date: Mon, 11 Oct 1999 15:47:11 -0700 (PDT) From: Bart Schaefer To: Adam Spiers cc: zsh workers mailing list Subject: Re: PATCH: prompt fun In-Reply-To: <19991011223022.A23117@thelonious.new.ox.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 11 Oct 1999, Adam Spiers wrote: > Bart Schaefer (schaefer@candle.brasslantern.com) wrote: > > > > Run the "cvs diff" output through this: > > > > sed -e '/^RCS/,/^---/d' -e '/^\+\+\+/d' > > What if a line within the hunk begins with `--' or `++' though? Removed lines beginning with "--" shouldn't be a problem, as there won't be more than one line beginning with "RCS" for any file, and there must be a line beginning with "---" above all hunks for each file in either diff format. Added lines beginning with "++" would cause patch to fail with a warning about a malformed diff. I think that's probably a pretty rare occurrence (since we're almost exclusively patching shell script and C source), but you could make the pattern more detailed if you're concerned: -e '/^\+\+\+ .* [0-9]+:[0-9]+:[0-9]+/d' That forces there to be a space after the "+++" and something that looks like a time on the line as well. Get as precise as you like ...