Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Junio C Hamano
Jeff King writes: > I think it does apply, though the reasoning in the commit message of > "this is OK because 'left' is large enough" becomes a lot more > hand-wavy. The patch is not making anything _worse_, certainly, but the > fact of the matter is that "left" still might not be big enough, if

Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Ramsay Jones
On 14/03/2019 00:19, Jeff King wrote: > On Wed, Mar 13, 2019 at 09:49:58PM +, Ramsay Jones wrote: > >> From: Jeff King >> [...] >> Signed-off-by: Ramsay Jones > > Signed-off-by: Jeff King > > Naturally. :) > >> As promised, I am forwarding a 'saved' patch from Jeff, which was >> a by-

Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Jeff King
On Wed, Mar 13, 2019 at 09:49:58PM +, Ramsay Jones wrote: > From: Jeff King > [...] > Signed-off-by: Ramsay Jones Signed-off-by: Jeff King Naturally. :) > As promised, I am forwarding a 'saved' patch from Jeff, which was > a by-product of a long-ago discussion regarding commit 5efde212fc

Re: [PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Ramsay Jones
On 13/03/2019 21:49, Ramsay Jones wrote: > From: Jeff King > > We use the "offset" variable for two purposes. It's the offset into > the packfile that the caller provides us (which is rightly an off_t, > since we might have a packfile much larger than memory). But later we > also use it as the

[PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-13 Thread Ramsay Jones
From: Jeff King We use the "offset" variable for two purposes. It's the offset into the packfile that the caller provides us (which is rightly an off_t, since we might have a packfile much larger than memory). But later we also use it as the offset within a given mmap'd window, and that window ca

Re: [RFC/PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-12 Thread Ramsay Jones
On 12/03/2019 20:26, Jeff King wrote: > On Tue, Mar 12, 2019 at 05:39:13PM +, Ramsay Jones wrote: > >> On 12/03/2019 16:55, Ramsay Jones wrote: >>> From: Jeff King >>> >>> Signed-off-by: Ramsay Jones > > Could definitely use a commit message. I think it's something like: > > We use th

Re: [RFC/PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-12 Thread Jeff King
On Tue, Mar 12, 2019 at 05:39:13PM +, Ramsay Jones wrote: > On 12/03/2019 16:55, Ramsay Jones wrote: > > From: Jeff King > > > > Signed-off-by: Ramsay Jones Could definitely use a commit message. I think it's something like: We use the "offset" variable for two purposes. It's the offset

Re: [RFC/PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-12 Thread Ramsay Jones
On 12/03/2019 16:55, Ramsay Jones wrote: > From: Jeff King > > Signed-off-by: Ramsay Jones > --- > > Hi Jeff, > > I recently tried (yet again) to tidy up some old branches. When I get > around to doing a 'git gc; git fsck' I always take a quick look at > the 'dangling' commits, just before

[RFC/PATCH] packfile: use extra variable to clarify code in use_pack()

2019-03-12 Thread Ramsay Jones
From: Jeff King Signed-off-by: Ramsay Jones --- Hi Jeff, I recently tried (yet again) to tidy up some old branches. When I get around to doing a 'git gc; git fsck' I always take a quick look at the 'dangling' commits, just before a 'git gc --prune=now'. I had no recollection of this commit, f