git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Adam Dinwoodie <adam@dinwoodie.org>
To: Christian Couder <christian.couder@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [RFC PATCH] rebisect: add script for easier bisect log editing
Date: Wed, 8 Nov 2017 16:50:33 +0000	[thread overview]
Message-ID: <20171108165033.GF20681@dinwoodie.org> (raw)
In-Reply-To: <CAP8UFD35yFTB5_D6=WyXN47Lgo3PvLJi3yWfzTAK5aYjE9YjNg@mail.gmail.com>

On Wednesday 08 November 2017 at 05:15 pm +0100, Christian Couder wrote:
> >> +git bisect replay "$GIT_BISECT_LOG_TMP"
> >> +rm -f "$GIT_BISECT_LOG_TMP"
> 
> While at it, is there a reason for the -f option above?

I was following the lead of git-bisect.sh, which has used `rm -f` for
such things ever since it was first introduced[^1], although it appears
that, since v2.15.0, all the `rm`s in that script have been moved to the
C code[^2].

Actually applying thought, rather than just following existing
precedent, I suspect having `-f` is useful because it means the command
will work even if the shell has picked up that `rm` should otherwise
have a `-i` argument from somewhere.

[^1]: 8cc6a0831 ("[PATCH] Making it easier to find which change introduced a bug", 2005-07-30)
[^2]: fb71a3299 ("bisect--helper: `bisect_clean_state` shell function in C", 2017-09-29)

  reply	other threads:[~2017-11-08 16:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 13:59 [RFC PATCH] rebisect: add script for easier bisect log editing Adam Dinwoodie
2017-11-08 16:12 ` Christian Couder
2017-11-08 16:15   ` Christian Couder
2017-11-08 16:50     ` Adam Dinwoodie [this message]
2017-11-08 16:32   ` Adam Dinwoodie
2017-11-20 18:24 ` [RFC PATCH v2 0/2] bisect: add a single command for editing logs Adam Dinwoodie
2017-11-22  5:35   ` Junio C Hamano
2017-11-20 18:24 ` [RFC PATCH v2 1/2] bisect: split out replay file parsing Adam Dinwoodie
2017-11-20 18:24 ` [RFC PATCH v2 2/2] bisect: add "edit" command Adam Dinwoodie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171108165033.GF20681@dinwoodie.org \
    --to=adam@dinwoodie.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).