builtin-archive: do not free a tree held by the object layer.
authorJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 22:07:59 +0000 (14:07 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 9 Jan 2007 22:07:59 +0000 (14:07 -0800)
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

index 391cf43..32737d3 100644 (file)
@@ -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;