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

Re: unused parameters in merge-recursive.c

From
Jeff King <peff@peff.net>
Date
Oct 19, 2018, 19:04 UTC
Message-ID
<20181019190416.GB24418@sigill.intra.peff.net>
In-Reply-To
<CABPp-BHobf8wbBsXF97scNQCzkxQukziODRXq6JOOWq61cAd9g@mail.gmail.com>
On Fri, Oct 19, 2018 at 10:58:19AM -0700, Elijah Newren wrote:
Show 6 quoted lines
> > In most cases I've been trying to determine the "bug versus cruft" thing
> > myself, but I fear that merge-recursive exceeds my abilities here. ;)
> 
> These ones all look like cruft to me.  I dug through them and tried
> looking through history and old submissions for my guesses and how
> they ended up here; details below.
Good, that makes things easier. :)
Show 12 quoted lines
> >  static int handle_rename_via_dir(struct merge_options *o,
> >                                  struct diff_filepair *pair,
> > -                                const char *rename_branch,
> > -                                const char *other_branch)
> > +                                const char *rename_branch)
> 
> Given the similarity in function signature to handle_rename_delete(),
> it's possible I copied the function and then started editing.  Whether
> I was lazily doing that, or if I really added that parameter because I
> thought I was going to add an informational message to the user that
> used it, or something else, I don't know.  But I agree, it's just not
> needed and could be added back later if someone did find a use for it.
Yeah, this was the one I was most worried about.

Thanks for confirming. I'm preparing a bunch of similar cleanups, so I'll roll this into that series.

-Peff
Previous: Elijah Newren
Message 3 of 3 in “unused parameters in merge-recursive.c”
  1. Jeff KingOct 19, 2018
  2. Elijah NewrenOct 19, 2018
  3. Jeff KingOct 19, 2018

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.