Re: [RFC PATCH] rebisect: add script for easier bisect log editing
- From
Adam Dinwoodie <adam@dinwoodie.org>
- Date
- Nov 8, 2017, 16:50 UTC
- Message-ID
- <20171108165033.GF20681@dinwoodie.org>
- 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)