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

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)

Previous: Christian CouderNext: Adam Dinwoodie
Message 4 of 9 in “rebisect: add script for easier bisect log editing”
  1. rebisect: add script for easier bisect log editingAdam Dinwoodie, Nov 8, 2017
  2. Christian CouderNov 8, 2017
  3. Christian CouderNov 8, 2017
  4. Adam DinwoodieNov 8, 2017
  5. Adam DinwoodieNov 8, 2017
  6. 0/2 bisect: add a single command for editing logsAdam Dinwoodie, Nov 20, 2017
  7. 1/2 bisect: split out replay file parsingAdam Dinwoodie, Nov 20, 2017
  8. 2/2 bisect: add "edit" commandAdam Dinwoodie, Nov 20, 2017
  9. Junio C HamanoNov 22, 2017

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.