From: Junio C Hamano Date: Thu, 27 Oct 2005 22:02:10 GMT Subject: Re: [PATCH gitweb] Visually indicating patch size with horizontal bars Message-ID: <7vfyqm1uvx.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20051027203945.GC1622@pe.Belkin> Chris Shoemaker writes: > If anyone thinks this is a good feature, then please tell me an > efficient way to get some heuristic of the patch size. > > Right now, I'm using: > > GIT_DIFF_OPTS='-U 0' $gitbin/git-diff-tree -p $hash | wc -l > > which is pretty slow. Any suggestions? * do we really want to know the number of lines? sometimes the number of pahts that are affected is more useful than number of lines when assessing the damage, which can be done with 'git-diff-tree --name-only'. * cache the result -- they never change. An interesting question is what to do with merges, but probably we can just ignore it for now.