{"thread":{"id":"5723","subject":"PATCH/RFC] allow delta data reuse even if base object is a preferred base","startedAt":"2006-09-27T19:42:16Z","lastAt":"2006-09-27T19:53:37Z","messageCount":2,"participants":["Nicolas Pitre","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"27808","messageId":"Pine.LNX.4.64.0609271536470.9349@xanadu.home","threadId":"5723","inReplyTo":null,"subject":"PATCH/RFC] allow delta data reuse even if base object is a preferred base","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2006-09-27T19:42:16Z","receivedAt":"2006-09-27T19:42:16Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n\n---\n\nAny reason why this couldn't be done?\n\nWhen I reworked that code I preserved the existing logic wrt preferred \nbase.  However I could not find a reason why it was that way.  Hence \nthis patch.\n\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex 6db97b6..ee5f031 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -989,7 +988,7 @@ static void check_object(struct object_e\n \t\tunuse_packed_git(p);\n \t\tentry->in_pack_header_size = used;\n \n-\t\tif (base_entry && !base_entry->preferred_base) {\n+\t\tif (base_entry) {\n \n \t\t\t/* Depth value does not matter - find_deltas()\n \t\t\t * will never consider reused delta as the\n"},{"id":"27812","messageId":"7vlko59jcu.fsf@assigned-by-dhcp.cox.net","threadId":"5723","inReplyTo":"Pine.LNX.4.64.0609271536470.9349@xanadu.home","subject":"Re: PATCH/RFC] allow delta data reuse even if base object is a preferred base","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-09-27T19:53:37Z","receivedAt":"2006-09-27T19:53:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Pitre <nico@cam.org> writes:\n\n> Signed-off-by: Nicolas Pitre <nico@cam.org>\n>\n> ---\n>\n> Any reason why this couldn't be done?\n>\n> When I reworked that code I preserved the existing logic wrt preferred \n> base.  However I could not find a reason why it was that way.  Hence \n> this patch.\n>\n> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\n> index 6db97b6..ee5f031 100644\n> --- a/builtin-pack-objects.c\n> +++ b/builtin-pack-objects.c\n> @@ -989,7 +988,7 @@ static void check_object(struct object_e\n>  \t\tunuse_packed_git(p);\n>  \t\tentry->in_pack_header_size = used;\n>  \n> -\t\tif (base_entry && !base_entry->preferred_base) {\n> +\t\tif (base_entry) {\n>  \n>  \t\t\t/* Depth value does not matter - find_deltas()\n>  \t\t\t * will never consider reused delta as the\n\nI was wondering about it myself the other day because I do not\nremember the reasoning why I thought we do not want to reuse the\ndelta when the base object is not part of the resulting pack.\nWe would recompute and create the delta ourselves anyway if we\ndo not take this branch, so it is not about avoiding to delta\nit.\n\nI really do not see the reason now; I think it is safe and\nreasonable to remove the check.\n"}]}