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
Andy Lester <andy@petdance.com>
Date
Apr 22, 2009, 19:06 UTC
Message-ID
<FF499E4E-B2F1-4795-B9F9-AD73CDDE417A@petdance.com>
In-Reply-To
<20090422190337.GA13424@coredump.intra.peff.net>
On Apr 22, 2009, at 2:03 PM, Jeff King wrote:
Show 5 quoted lines
> I think Andy was referring to (2), and I think that should be cleaned
> up, as the different versions have a tendency to diverge. Probably
> addressing (1) by moving send_pack() to transport.c makes sense as  
> part
> of the same cleanup.

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.

xoxo, Andy

-- Andy Lester => andy@petdance.com => www.theworkinggeek.com => AIM:petdance

Previous: Jeff KingNext: Jeff King
Message 4 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.