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

Re: [PATCH] add definitions for global variables to shell.c

From
Robert Schiele <rschiele@gmail.com>
Date
Aug 19, 2008, 08:16 UTC
Message-ID
<20080819081625.GF11842@schiele.dyndns.org>
In-Reply-To
<7vpro5fnke.fsf@gitster.siamese.dyndns.org>
On Tue, Aug 19, 2008 at 12:53:21AM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> Even if that is the case, I do not like the prospect of having to maintain
> a set of duplicated variable definitions.  If we really wanted to address
> this issue, maybe we would want a separate source file that is linked to
> both git-shell and to the rest of the system that has nothing but
> definitions of these variables?  I thought environment.c was meant to be

Ok, so how about globals.c and move just global variables that have at least two references there?

> something like that -- would linking environment.o pull in too many extra
> references these days (again, I didn't try)?

This pulls in almost everything these days. In our specific case even the functions that were redefined in shell.c to start the whole mess. Thus as soon as we add environment.c we end up with duplicate symbols on linking git-shell again.

Robert
-- 
Robert Schiele
Dipl.-Wirtsch.informatiker	mailto:rschiele@gmail.com

"Quidquid latine dictum sit, altum sonatur."
Previous: Junio C HamanoNext: Johannes Sixt
Message 5 of 13 in “add definitions for global variables to shell.c”
  1. add definitions for global variables to shell.cRobert Schiele, Aug 18, 2008
  2. Junio C HamanoAug 19, 2008
  3. Robert SchieleAug 19, 2008
  4. Junio C HamanoAug 19, 2008
  5. Robert SchieleAug 19, 2008
  6. Johannes SixtAug 19, 2008
  7. Robert SchieleAug 19, 2008
  8. Junio C HamanoAug 19, 2008
  9. 1/2 shell: do not play duplicated definition games to shrink the executableJunio C Hamano, Aug 20, 2008
  10. 2/2 Build-in "git-shell"Junio C Hamano, Aug 20, 2008
  11. Johannes SixtAug 20, 2008
  12. Junio C HamanoAug 20, 2008
  13. Robert SchieleAug 20, 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.