From: Andreas Ericsson Date: Thu, 19 Jan 2006 12:35:29 GMT Subject: Re: New ref generates 8MB mail message Message-ID: <43CF8791.6050705@op5.se> In-Reply-To: Linus Torvalds wrote: > > On Wed, 18 Jan 2006, Matthew Wilcox wrote: > >>Based on the idea that a new branch is probably a branch off master, and >>if it isn't, then at least sending a log vs master is better than a log >>vs the beginning of time, I propose this patch: > > > Actually, since the update hook _should_ be called before the ref has > actually been updated, it's probably much better to instead of this: > > >>- git-rev-list --pretty "$3" >>+ git-rev-list --pretty "$3" ^master > > > do something like this: > > git-rev-list --pretty "$3" $(git-rev-parse --not --all) > > which basically says: show any commits that are in the new ref, but are > not in _any_ other ref. > > Untested, of course. > Tested. It works fine and is, surprisingly, insanely fast. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231