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

Re: Removing duplicated code between builtin-send-pack.c and transport.c

From
Jeff King <peff@peff.net>
Date
Apr 22, 2009, 19:10 UTC
Message-ID
<20090422191044.GC13424@coredump.intra.peff.net>
In-Reply-To
<FF499E4E-B2F1-4795-B9F9-AD73CDDE417A@petdance.com>
On Wed, Apr 22, 2009 at 02:06:22PM -0500, Andy Lester wrote:
Show 6 quoted lines
> Yes, exactly.  I was applying const to function parameters in builtin- 
> send-pack.c, and discovered the duplication.  I sure don't want to patch 
> twice if we don't need to.
>
> So it sounds like what I'll do is start a send-pack.c and hoist out the 
> common functions from builtin-send-pack.c and transport.c.

I don't know if that is quite appropriate. I think the point of moving many of the duplicated functions into transport.c is that they are used by other transports, like http. So probably the transport-agnostic ones should stay in transport.c, and they should all get called in the same way, no matter what the transport.

-Peff
Previous: Andy LesterNext: Andy Lester
Message 5 of 7 in “Removing duplicated code between builtin-send-pack.c and transport.c”
  1. Andy LesterApr 22, 2009
  2. Daniel BarkalowApr 22, 2009
  3. Jeff KingApr 22, 2009
  4. Andy LesterApr 22, 2009
  5. Jeff KingApr 22, 2009
  6. Andy LesterApr 22, 2009
  7. Jeff KingApr 22, 2009

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.