Re: [PATCH] refs.c: use a stringlist for repack_without_refs
From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:59
Junio C Hamano [off-list ref] writes:
Stefan Beller [off-list ref] writes:quoted
This patch was heavily inspired by a part of the ref-transactions-rename series[1], but people tend to dislike large series and this part is relatively easy to take out and unrelated, so I'll send it as a single patch. This patch doesn't intend any functional changes. It is just a refactoring, which replaces a char** array by a stringlist in the function repack_without_refs. [1] https://www.mail-archive.com/git@vger.kernel.org/msg60604.html Idea-by: Ronnie Sahlberg [off-list ref] Signed-off-by: Stefan Beller <redacted> --- builtin/remote.c | 22 +++++++--------------- refs.c | 41 ++++++++++++++++++++--------------------- refs.h | 3 +-- 3 files changed, 28 insertions(+), 38 deletions(-)In one codepath we were already using a string_list delete_refs_list anyway, so it makes sense to reuse that by movingan existing call to string_list_insert() a bit higher, instead of maintaining another array of pointers delete_refs[] to strings. OK, it simplifies the code by reducing the line count, which is a plus ;-) Sounds good.
I queued this but as I suspected yesterday had to drop all the other rs/ref-transaction-* topics that are not in 'next' yet. I am guessing that your plan is to make them come back one piece at a time in many easier-to-digest bite sized series.