From: Junio C Hamano Date: Sat, 07 Mar 2009 21:49:57 GMT Subject: Re: [PATCH] http: add_fill_function checks if function has been added Message-ID: <7vd4ctm29m.fsf@gitster.siamese.dyndns.org> In-Reply-To: Tay Ray Chuan writes: > Calling a fill function repeatedly won't break behaviour, because fill > functions (those that are currently defined in git) are designed to be > called repeatedly. But it's just useless to call the same fill > function repeatedly without any reason. > > So should I still address the "THIS and THAT breakages"? Your above explanation is good, but it was given after I asked ;-). Making unnecessary call repeatedly counts as a breakage your patch fixes, right? I didn't look at the callers of add_fill_function(), but "fill" takes a callback data and different invocation of add_fill_function() could be passing different callback data. In such a case, doesn't it feel wrong to omit the "duplicated" calls to register the fill callback? Your patch makes me suspect that it _might_ be better to fix the callers not to call the function repeatedly when they know they only want one-shot invocation.