Re: [PATCH 1/3] rebase -i: several cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 26 Jun 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> >> > +die_abort () {
> >> > +	rm -rf "$DOTEST" 2> /dev/null
> >> > +	die "$1"
> >> > +}
> >> 
> >> Why "2>/dev/null" here?
> >
> > Just to be sure. If it does not exist, it's no error. No sense alarming 
> > the user.
> 
> Yeah, but isn't that exactly why you have "-f" there?  On the
> other hand, if $DOTEST exists but for some reason couldn't be
> removed, we probably would want to know about it.
> 
>     $ rm -fr no-such
>     $ mkdir no-such
>     $ echo >no-such/file
>     $ rm -fr no-such
>     $ mkdir no-such
>     $ echo >no-such/file
>     $ chmod a-w no-such
>     $ rm -fr no-such
>     rm: cannot remove `no-such/file': Permission denied

Good point.

Okay, let's leave the 2> /dev/null out.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux