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

Re: [PATCH?] Fix 'git show' on signed tag of signed tag of commit

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 1, 2008, 16:39 UTC
Message-ID
<alpine.LSU.1.00.0807011836500.32725@wbgn129.biozentrum.uni-wuerzburg.de>
In-Reply-To
<1214905624-29517-1-git-send-email-trast@student.ethz.ch>
Hi,
On Tue, 1 Jul 2008, Thomas Rast wrote:
Show 14 quoted lines
> The cmd_show loop resolves tags by showing them, then pointing the
> object to the 'tagged' member.  However, this object is not fully
> initialized; it only contains the SHA1.  (This resulted in a segfault
> if there were two levels of tags.)  We apply parse_object to get a
> full object.
> 
> Noticed by Kalle Olavi Niemitalo on IRC.
> 
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> ---
> 
> I'm not 100% sure this is the right fix; I just had a quick stab at the 
> code, made a fix and tested it.  It probably leaks memory too, not sure 
> if this is a problem.
AFAICT this is the correct way to solve the problem.

We do not "leak" memory here, since we just assume objects to be singletons (they are immutable, after all).

FWIW I had a "release_all_objects()" function in my personal fork for a long time, which was quite painful to write. But maintaining the "move all builtins into libgit.a and avoid fork()&&exec()ing them" patch was the only user, and since it became way too painful to maintain out of the tree, I dropped both.

Ciao, Dscho

Previous: Thomas RastNext: Junio C Hamano
Message 2 of 3 in “Fix 'git show' on signed tag of signed tag of commit”
  1. Fix 'git show' on signed tag of signed tag of commitThomas Rast, Jul 1, 2008
  2. Johannes SchindelinJul 1, 2008
  3. Junio C HamanoJul 1, 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.