Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v6 0/8] port branch.c to use the filtering part of ref-filter.

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:06:40

Karthik Nayak [off-list ref] writes:
quoted hunk
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -479,8 +479,6 @@ static void print_ref_list(struct ref_filter *filter, struct ref_sorting *sortin
 	struct ref_array array;
 	int maxwidth = 0;
 	const char *remote_prefix = "";
-	struct ref_sorting def_sorting;
-	const char *sort_type = "refname";
This was allocated on stack ...
quoted hunk
@@ -498,12 +496,15 @@ static void print_ref_list(struct ref_filter *filter, struct ref_sorting *sortin
+	if (!sorting)
+		sorting = ref_default_sorting();
and it's now allocated by xcalloc within ref_default_sorting(). In
theory, you need a free(). But the sensible place to add this free would
be after the call to print_ref_list(), and this is right before the
process terminates. So it's probably overkill to add a free().

The series looks good to me. I did a minor remark on PATCH 5/8 but this
should not block inclusion.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help