From: Junio C Hamano Date: Tue, 23 Feb 2010 00:49:02 GMT Subject: Re: [PATCH v5 00/11] several notes refs, post-rewrite, notes rewriting Message-ID: <7v1vgcpyip.fsf@alter.siamese.dyndns.org> In-Reply-To: Thomas Rast writes: >> Yuck. If you know what needs to be done, do that before other poeple add >> more options, please. > > *shrug* > > I was trying to be smart and save a call to git_config() when we know > we don't care about the config anyway. After all it does read a bunch > of files. You can set a flag to skip reading the trees (which is the expensive part) you know you are not going to use to optimize out the expensive part of the code, no? >> Perhaps I am not reading your code right in which case this part needs a >> bit more commenting? > > The catch is in the '&& t->ref'. Ahh, Ok, so that was what I didn't see. Perhaps it needs to say t->ref is set only under such and such conditions. I am reasonably sure the next person who needs to change this part of the code would appreciate such a comment and that person may even be you 3 months from now.