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

Re: [PATCH v2 3/5] doc: remove unnecessary rm instances

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 17, 2021, 10:42 UTC
Message-ID
<60a24897afda0_126a0520834@natae.notmuch>
In-Reply-To
<YKIu/DUfmU8JbDY2@coredump.intra.peff.net>
Jeff King wrote:
> On Sat, May 15, 2021 at 07:04:05AM -0500, Felipe Contreras wrote:
> > Jeff King wrote:
Show 23 quoted lines
> > > That does differ in that it removes $@+, too, but the premise is the
> > > same (we know that $@+ could not be a problem, as we're about to
> > > clobber it anyway).
> > > 
> > > I'm OK with getting rid of all of them, but it seems like it ought to be
> > > happening all in this patch.
> > 
> > Yeah, but the rationale is different.
> > 
> >   1. $(RM) $@: these remove the target file because of permissions
> >      (i.e. root owned)
> >   2. $(RM) $@+ $@ && $(CODE) && mv $@+ $@: these are for interrupted builds
> > 
> > To get rid of #2 we need an alternative solution, like .DELETE_ON_ERROR,
> > to get rid of #1 we don't, we can just do it.
> 
> To get rid of the "mv", you need something like .DELETE_ON_ERROR. But
> the "rm" in the second case has nothing to do with interrupted builds.
> It is is doing the same nothing that the ones you are getting rid of
> here are.
> 
> I.e., I was suggesting to get rid of the "rm" call in the hunk I showed
> above, but leave the "mv" for the follow-on patch.
Ahh, I see. It's quite a bit more work, but sure, I can do that.
-- 
Felipe Contreras
Previous: Jeff KingNext: Jeff King
Message 8 of 11 in “doc: asciidoc cleanups”
  1. 0/5 doc: asciidoc cleanupsFelipe Contreras, May 14, 2021
  2. 1/5 doc: refactor common asciidoc dependenciesFelipe Contreras, May 14, 2021
  3. 2/5 doc: improve asciidoc dependenciesFelipe Contreras, May 14, 2021
  4. 3/5 doc: remove unnecessary rm instancesFelipe Contreras, May 14, 2021
  5. Jeff KingMay 15, 2021
  6. Felipe ContrerasMay 15, 2021
  7. Jeff KingMay 17, 2021
  8. Felipe ContrerasMay 17, 2021
  9. Jeff KingMay 17, 2021
  10. 4/5 doc: simplify Makefile using .DELETE_ON_ERRORFelipe Contreras, May 14, 2021
  11. 5/5 doc: avoid using rm directlyFelipe Contreras, May 14, 2021

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.