Re: [PATCH v2 4/8] cherry-pick: store rewritten commits

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 4/8] cherry-pick: store rewritten commits

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:32

Felipe Contreras [off-list ref] writes:
+static void add_rewritten(unsigned char *from, unsigned char *to)
+{
+	struct rewritten_list_item *item;
+	if (rewritten.nr + 1 >= rewritten.alloc) {
+		rewritten.alloc += 32;
+		rewritten.items = xrealloc(rewritten.items, rewritten.alloc * sizeof(*rewritten.items));
+	}
Is there a compelling reason not to use ALLOC_GROW() here?

Re: [PATCH v2 4/8] cherry-pick: store rewritten commits

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:57:32

On Mon, Jun 3, 2013 at 1:49 PM, Junio C Hamano [off-list ref] wrote:
Felipe Contreras [off-list ref] writes:
quoted
+static void add_rewritten(unsigned char *from, unsigned char *to)
+{
+     struct rewritten_list_item *item;
+     if (rewritten.nr + 1 >= rewritten.alloc) {
+             rewritten.alloc += 32;
+             rewritten.items = xrealloc(rewritten.items, rewritten.alloc * sizeof(*rewritten.items));
+     }
Is there a compelling reason not to use ALLOC_GROW() here?
Nope, I just copied the logic from another part of Git.

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help