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

Re: [PATCH] get_tree_entry: map blank requested entry to tree root

From
Junio C Hamano <junkio@cox.net>
Date
Jan 10, 2007, 01:04 UTC
Message-ID
<7v64bfheuk.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070110005750.GA18242@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> On Tue, Jan 09, 2007 at 04:57:11PM -0800, Junio C Hamano wrote:
>
>> I've noticed this while looking at your patch and fixed it in my
>> tree already.
>
> Thanks, I will stop looking, then. :)

-- >8 -- [PATCH] builtin-archive: do not free a tree held by the object layer.

Found by running "git archive --format=tar HEAD" in Documentation/ directory.

It's surprising that nobody has noticed this from the beginning...
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 builtin-archive.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/builtin-archive.c b/builtin-archive.c
index 391cf43..32737d3 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -137,7 +137,6 @@ void parse_treeish_arg(const char **argv, struct archiver_args *ar_args,
 		if (err || !S_ISDIR(mode))
 			die("current working directory is untracked");
 
-		free(tree);
 		tree = parse_tree_indirect(tree_sha1);
 	}
 	ar_args->tree = tree;
Previous: Jeff King
Message 7 of 7 in “get_tree_entry: map blank requested entry to tree root”
  1. get_tree_entry: map blank requested entry to tree rootJeff King, Jan 9, 2007
  2. Johannes SchindelinJan 9, 2007
  3. Junio C HamanoJan 9, 2007
  4. Jeff KingJan 10, 2007
  5. Junio C HamanoJan 10, 2007
  6. Jeff KingJan 10, 2007
  7. Junio C HamanoJan 10, 2007

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.