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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 27, 2007, 01:57 UTC
Message-ID
<7vodj2tazk.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<Pine.LNX.4.64.0706270216070.4438@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 9 quoted lines
>> > +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
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 6 in “rebase -i: several cleanups”
  1. 1/3 rebase -i: several cleanupsJohannes Schindelin, Jun 25, 2007
  2. Junio C HamanoJun 27, 2007
  3. Johannes SchindelinJun 27, 2007
  4. Junio C HamanoJun 27, 2007
  5. Johannes SchindelinJun 27, 2007
  6. Junio C HamanoJun 27, 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.