summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6b1f8c3)
raw | patch | inline | side by side (parent: 6b1f8c3)
author | Petr Baudis <pasky@suse.cz> | |
Sat, 18 Nov 2006 02:56:52 +0000 (03:56 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 18 Nov 2006 19:09:46 +0000 (11:09 -0800) |
Unfortunately, git-for-each-refs is currently unusable for peeking into tag
comments, since it uses freed pointers, so it just prints out all sort of
garbage.
This makes it strdup() contents and body values.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
comments, since it uses freed pointers, so it just prints out all sort of
garbage.
This makes it strdup() contents and body values.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-for-each-ref.c | patch | blob | history |
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 173bf38735315a1c299f1f2e3db76a7795a2305c..227aa3cd7f887ad44fd6b885479ef2afb586ded4 100644 (file)
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -478,9 +478,9 @@ static void grab_sub_body_contents(struct atom_value *val, int deref, struct obj
if (!strcmp(name, "subject"))
v->s = copy_line(subpos);
else if (!strcmp(name, "body"))
- v->s = bodypos;
+ v->s = xstrdup(bodypos);
else if (!strcmp(name, "contents"))
- v->s = subpos;
+ v->s = xstrdup(subpos);
}
}