Re: [PATCH] sha1_name: don't resolve refs when core.warnambiguousrefs is false

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

 



On Mon, Jan 06, 2014 at 07:35:04PM -0800, Brodie Rao wrote:

> On Mon, Jan 6, 2014 at 7:32 PM, Brodie Rao <brodie@xxxxx> wrote:
> > This change ensures get_sha1_basic() doesn't try to resolve full hashes
> > as refs when ambiguous ref warnings are disabled.
> >
> > This provides a substantial performance improvement when passing many
> > hashes to a command (like "git rev-list --stdin") when
> > core.warnambiguousrefs is false. The check incurs 6 stat()s for every
> > hash supplied, which can be costly over NFS.
> 
> Forgot to add:
> 
> Signed-off-by: Brodie Rao <brodie@xxxxx>

Looks good to me.

I wonder if I should have simply gone this route instead of adding
warn_on_object_refname_ambiguity, and then people who want "cat-file
--batch" to be fast could just turn off core.warnAmbiguousRefs. I wanted
it to happen automatically, though. Alternatively, I guess "cat-file
--batch" could just turn off warn_ambiguous_refs itself.

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