git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Guilt: Fixed guilt-patchbomb temporary mbox deletion bug

From
JSJosef Sipek <jsipek@fsl.cs.sunysb.edu>
Date
Mar 6, 2007, 07:53 UTC
Message-ID
<20070306075316.GC26626@filer.fsl.cs.sunysb.edu>
In-Reply-To
<20070306074740.GB26626@filer.fsl.cs.sunysb.edu>
On Tue, Mar 06, 2007 at 02:47:41AM -0500, Josef Sipek wrote:
Show 33 quoted lines
> On Tue, Mar 06, 2007 at 03:01:46PM +0800, Nur Hussein wrote:
> > A bug occurred where the temporary mbox is deleted even when 'N' or 'n' was selected
> > because of the incorrect use of the -a operator when testing user input. Fixed now to
> > use -o instead.
> > 
> > Signed-off-by: Nur Hussein <hussein@cs.usm.my>
> > ---
> >  guilt-patchbomb |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/guilt-patchbomb b/guilt-patchbomb
> > index 6f51b4b..ad80fb1 100755
> > --- a/guilt-patchbomb
> > +++ b/guilt-patchbomb
> > @@ -88,5 +88,5 @@ fi
> >  echo -n "Delete temporary directory? [Y/n] "
> >  read n
> >  
> > -[ "$n" != "n" -a "$n" != "N" ] && exit 0
> > +[ "$n" != "n" -o "$n" != "N" ] && exit 0
> >  rm -rf $dir
> 
> Would this actually work?
> 
> input		$n != n		$n != N		action (-a)	action (-o)
> ---------------------------------------------------------------------------
> <not N>		true		true		exit		exit
> n		false		true		rm		exit
> N		true		false		rm		exit
> 
> 
> The new statement seems wrong. The fact that the original statement had the
> logic inverted still remains. It should be exit if ($n==n || $n==N).
I fixed it up and commited it.
Thanks,
Josef "Jeff" Sipek.
-- 
It used to be said [...] that AIX looks like one space alien discovered
Unix, and described it to another different space alien who then implemented
AIX. But their universal translators were broken and they'd had to gesture a
lot.
		- Paul Tomblin 
Previous: Josef Sipek
Message 5 of 5 in “Guilt: Fixed guilt-patchbomb temporary mbox deletion bug”
  1. 1/1 Guilt: Fixed guilt-patchbomb temporary mbox deletion bugNur Hussein, Mar 6, 2007
  2. Junio C HamanoMar 6, 2007
  3. Josef SipekMar 6, 2007
  4. Josef SipekMar 6, 2007
  5. Josef SipekMar 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.