Jeff King <peff@xxxxxxxx> writes: > On Fri, Aug 07, 2015 at 05:24:29PM -0700, Junio C Hamano wrote: > >> Since 5a688fe4 ("core.sharedrepository = 0mode" should set, not >> loosen, 2009-03-25), we kept reminding ourselves: >> >> NEEDSWORK: this should be renamed to finalize_temp_file() as >> "moving" is only a part of what it does, when no patch between >> master to pu changes the call sites of this function. >> >> without doing anything about it. Let's do so. >> >> The purpose of this function was not to move but to finalize. The >> detail of the primarily implementation of finalizing was to link the >> temporary file to its final name and then to unlink, which wasn't >> even "moving". The alternative implementation did "move" by calling >> rename(2), which is a fun tangent. > > This is definitely a better name. But while we are touching the area, my > other pet peeve about this function is that it is really specific to > moving _object_ temp files around. It started life as static-local to > sha1-file.c, so not mentioning objects is OK, but when it became a > global, it's a bit confusing. > > Maybe finalize_object_file() would be a better name? > > -Peff OK, will fix. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html