Re: [PATCH 3/4] for-each-ref --format='%(symref) %(symref:short)'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 14, 2010 at 02:32:29AM -0800, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > It feels ugly that we need to re-resolve the ref when we simply threw
> > that information away earlier from when we called resolve_ref in
> > get_ref_dir...
> 
> It is true and I indeed thought about it while doing the patch, but "how
> often would we see symref in the entire refs list, and what percentage of
> callers would benefit from seeing this information?" stopped me from going
> further in that direction.

It is really only two code-paths (the one I mentioned, and the new one
you are adding). I was thinking that we had to pay the resolve_ref cost
for _every_ ref, symref or not, but that is not the case. Because we
pass along the flag, we can re-resolve only the few that need it.

So there is even less efficiency to be gained than I at first thought.
Let's just drop it, as it is such an invasive change for no good reason.

-Peff
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]