Re: [PATCH] gc: remove redundant check for gc_auto_threshold

2018-10-13 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Yeah, that's me :) I have some WIP gc cleanup, but want to sit on it a > bit before I submit it to think about the best way to do things. > > So in the meantime I was sending out a few WIP bits that I expected > could be reviewed stand-alone. I dunno. Unless

Re: [PATCH] gc: remove redundant check for gc_auto_threshold

2018-10-11 Thread Ævar Arnfjörð Bjarmason
On Wed, Oct 10 2018, Junio C Hamano wrote: > Brandon Casey writes: > >> ... Again, I don't feel strongly about it, but I'm not >> sure this change actually improves the code. > > Yeah, in the context of the current caller, this is a safe change > that does not break anybody and reduces the

Re: [PATCH] gc: remove redundant check for gc_auto_threshold

2018-10-10 Thread Brandon Casey
On Wed, Oct 10, 2018 at 4:38 PM Junio C Hamano wrote: > > Brandon Casey writes: > > > ... Again, I don't feel strongly about it, but I'm not > > sure this change actually improves the code. > > Yeah, in the context of the current caller, this is a safe change > that does not break anybody and

Re: [PATCH] gc: remove redundant check for gc_auto_threshold

2018-10-10 Thread Junio C Hamano
Brandon Casey writes: > ... Again, I don't feel strongly about it, but I'm not > sure this change actually improves the code. Yeah, in the context of the current caller, this is a safe change that does not break anybody and reduces the number of instructions executed in this codepath. A

Re: [PATCH] gc: remove redundant check for gc_auto_threshold

2018-10-10 Thread Brandon Casey
On Wed, Oct 10, 2018 at 12:32 PM Ævar Arnfjörð Bjarmason wrote: > > Checking gc_auto_threshold in too_many_loose_objects() was added in > 17815501a8 ("git-gc --auto: run "repack -A -d -l" as necessary.", > 2007-09-17) when need_to_gc() itself was also reliant on > gc_auto_pack_limit before its

[PATCH] gc: remove redundant check for gc_auto_threshold

2018-10-10 Thread Ævar Arnfjörð Bjarmason
Checking gc_auto_threshold in too_many_loose_objects() was added in 17815501a8 ("git-gc --auto: run "repack -A -d -l" as necessary.", 2007-09-17) when need_to_gc() itself was also reliant on gc_auto_pack_limit before its early return: gc_auto_threshold <= 0 && gc_auto_pack_limit <= 0 When