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

Re: [PATCH] shrink git-shell by avoiding redundant dependencies

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 18, 2008, 00:58 UTC
Message-ID
<20080718005814.GA4155@spearce.org>
In-Reply-To
<20080718002620.GE8421@leksak.fem-net>
Stephan Beyer <s-beyer@gmx.net> wrote:
Show 10 quoted lines
> >  
> > +/* Stubs for functions that make no sense for git-shell. These stubs
> > + * are provided here to avoid linking in external redundant modules.
> > + */
> > +void release_pack_memory(size_t need, int fd){}
> > +void trace_argv_printf(const char **argv, const char *fmt, ...){}
> > +void trace_printf(const char *fmt, ...){}
> 
> I don't really understand why this works.
> You redefine libgit.a functions here

On Solaris you cannot compile git with the Solaris compiler and linker, as the linker will not put up with the duplicate definition of these functions.

I told my co-worker who is taking over "that git stuff" from me at day-job to post a message to the list, or look at the Solaris manual pages and figure out what he needs to do in the Makefile to get it to work right. Neither has happened yet, and those day-job systems are the only Solaris boxen I touch, so I won't be fixing it anytime soon myself.

I have to wonder why its important we avoid linking to all of libgit.a here. So what if git-shell is a little bigger? This is certainly not fully portable, and does give warnings on some systems.

-- 
Shawn.
Previous: Stephan BeyerNext: Stephan Beyer
Message 6 of 16 in “shrink git-shell by avoiding redundant dependencies”
  1. shrink git-shell by avoiding redundant dependenciesDmitry Potapov, Jun 27, 2008
  2. Junio C HamanoJun 27, 2008
  3. Dmitry PotapovJun 27, 2008
  4. Junio C HamanoJun 27, 2008
  5. Stephan BeyerJul 18, 2008
  6. Shawn O. PearceJul 18, 2008
  7. Link git-shell only to a subset of libgit.aStephan Beyer, Jul 18, 2008
  8. Shawn O. PearceJul 18, 2008
  9. Dmitry PotapovJul 18, 2008
  10. Johannes SchindelinJul 18, 2008
  11. Remove function stubs in shell.cStephan Beyer, Jul 18, 2008
  12. Dmitry PotapovJul 18, 2008
  13. Dmitry PotapovJul 18, 2008
  14. Johannes SchindelinJun 28, 2008
  15. Dmitry PotapovJun 28, 2008
  16. Johannes SchindelinJun 28, 2008

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.